]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/denc: rewrite denc_traits for enums
authorKefu Chai <tchaikov@gmail.com>
Sun, 21 Aug 2022 00:33:39 +0000 (08:33 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sun, 21 Aug 2022 02:09:14 +0000 (10:09 +0800)
for better readability

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/include/denc.h

index a5dd60413b283601c94cebf64a51898ac4b1afd9..cdd4b0c320217cb615c43df77bda4815028c93ce 100644 (file)
@@ -300,15 +300,13 @@ T& get_pos_add(It& i) {
 }
 
 template<typename T>
-struct denc_traits<
-  T,
-  std::enable_if_t<
-    _denc::is_any_of<_denc::underlying_type_t<T>,
-                    ceph_le64, ceph_le32, ceph_le16, uint8_t
+requires _denc::is_any_of<_denc::underlying_type_t<T>,
+                         ceph_le64, ceph_le32, ceph_le16, uint8_t
 #ifndef _CHAR_IS_SIGNED
-                      , int8_t
+                         , int8_t
 #endif
-                    >>> {
+                         >
+struct denc_traits<T> {
   static constexpr bool supported = true;
   static constexpr bool featured = false;
   static constexpr bool bounded = true;