]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: specialize fmt::formater<> for types 49419/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 14 Dec 2022 07:17:33 +0000 (15:17 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 14 Dec 2022 08:56:22 +0000 (16:56 +0800)
since fmt v9, fmt::formatter<> is not specialized for the types with
operator<<(ostream&, ...) anymore. so we need to specialize it manually.
in this change, fmt::formatter<> is specialized for tree_stats_t and
test_item_t so the tree can compile with fmt v9.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/crimson/os/seastore/onode_manager/staged-fltree/fwd.h
src/test/crimson/seastore/onode_tree/test_value.h

index 9adba5e34e23af257986e25c7def32396b80a4e6..43f8b87ed95a3e950527e27f08c2204ac876c390 100644 (file)
@@ -189,3 +189,8 @@ void reset_ptr(PtrType& ptr, const char* origin_base,
 }
 
 }
+
+#if FMT_VERSION >= 90000
+template<>
+struct fmt::formatter<crimson::os::seastore::onode::tree_stats_t> : fmt::ostream_formatter {};
+#endif
index 435dd67a2f5a05e8179fb89094fdaef466c7ce0a..98249f8c956c00231a1403d16d5710e0fd98a4f2 100644 (file)
@@ -233,3 +233,8 @@ using ExtendedValue  = TestValue<
   value_magic_t::TEST_EXTENDED, 256, 2048, 1200, 8192, 16384, true>;
 
 }
+
+#if FMT_VERSION >= 90000
+template<>
+struct fmt::formatter<crimson::os::seastore::onode::test_item_t> : fmt::ostream_formatter {};
+#endif