From: Kefu Chai Date: Wed, 14 Dec 2022 00:20:42 +0000 (+0800) Subject: cls/fifo: specialize fmt::formater<> for rados::cls::fifo::info X-Git-Tag: v18.1.0~656^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=662163163c21ef1b48dc1cf379402fc38ac2f0f7;p=ceph.git cls/fifo: specialize fmt::formater<> for rados::cls::fifo::info 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/cls/fifo/cls_fifo_types.h b/src/cls/fifo/cls_fifo_types.h index 13f479fe64a..856732bcb79 100644 --- a/src/cls/fifo/cls_fifo_types.h +++ b/src/cls/fifo/cls_fifo_types.h @@ -25,7 +25,9 @@ #undef FMT_HEADER_ONLY #define FMT_HEADER_ONLY 1 #include - +#if FMT_VERSION >= 90000 +#include +#endif #include "include/buffer.h" #include "include/encoding.h" #include "include/types.h" @@ -522,3 +524,10 @@ inline std::ostream& operator <<(std::ostream& m, const part_header& p) { << "max_time: " << p.max_time; } } // namespace rados::cls::fifo + +#if FMT_VERSION >= 90000 +template<> +struct fmt::formatter : fmt::ostream_formatter {}; +template<> +struct fmt::formatter : fmt::ostream_formatter {}; +#endif