]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/cls_fio: specialize fmt::formater<> for bpo::options_description 49418/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 14 Dec 2022 00:27:13 +0000 (08:27 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 14 Dec 2022 03:01:43 +0000 (11:01 +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<bpo::options_description> is defined so
the tree can compile with fmt v9.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/test/cls_fifo/bench_cls_fifo.cc

index ae4b7e1ae64f9c2ba8bccf060b60409ddf956d82..a8ba1aa4b941b528ff1bde27d800051e7251c3e4 100644 (file)
@@ -49,6 +49,11 @@ namespace fifo = rados::cls::fifo;
 namespace s = spawn;
 namespace sc = std::chrono;
 
+#if FMT_VERSION >= 90000
+template<>
+struct fmt::formatter<bpo::options_description> : fmt::ostream_formatter {};
+#endif
+
 namespace {
 static constexpr auto PUSH = 0x01 << 0;
 static constexpr auto PULL = 0x01 << 1;