From 05f5f390d10925348fd0d94246b078f38713a0cb Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 14 Dec 2022 08:27:13 +0800 Subject: [PATCH] test/cls_fio: specialize fmt::formater<> for bpo::options_description 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 defined so the tree can compile with fmt v9. Signed-off-by: Kefu Chai --- src/test/cls_fifo/bench_cls_fifo.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/cls_fifo/bench_cls_fifo.cc b/src/test/cls_fifo/bench_cls_fifo.cc index ae4b7e1ae64f..a8ba1aa4b941 100644 --- a/src/test/cls_fifo/bench_cls_fifo.cc +++ b/src/test/cls_fifo/bench_cls_fifo.cc @@ -49,6 +49,11 @@ namespace fifo = rados::cls::fifo; namespace s = spawn; namespace sc = std::chrono; +#if FMT_VERSION >= 90000 +template<> +struct fmt::formatter : fmt::ostream_formatter {}; +#endif + namespace { static constexpr auto PUSH = 0x01 << 0; static constexpr auto PULL = 0x01 << 1; -- 2.47.3