From: Kefu Chai Date: Wed, 14 Dec 2022 00:27:13 +0000 (+0800) Subject: test/cls_fio: specialize fmt::formater<> for bpo::options_description X-Git-Tag: v18.1.0~656^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=05f5f390d10925348fd0d94246b078f38713a0cb;p=ceph.git 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 --- diff --git a/src/test/cls_fifo/bench_cls_fifo.cc b/src/test/cls_fifo/bench_cls_fifo.cc index ae4b7e1ae64f9..a8ba1aa4b941b 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;