before this change, we assume that `fmt/ostream.h` is included, and
reference `fmt::ostream_formatter`. this breaks the build if the tree
is compiled on {fmt} v9 and up.
after this change, `fmt/ostream.h` is conditionally included. as the
compiling unit is supposed to include fmt headers before including
headers in this project, we can tell if fmt/ostream.h is needed or not
by checking the FMT_VERSION macro.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
#include <iostream>
#include <string>
#include <optional>
+#if FMT_VERSION >= 90000
+#include <fmt/ostream.h>
+#endif
#include <sys/time.h>
#if defined(__APPLE__)
#include <iosfwd>
#include <map>
#include <string>
+#if FMT_VERSION >= 90000
+#include <fmt/ostream.h>
+#endif
#include "common/ceph_mutex.h"
#include "include/common_fwd.h"
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
+#if FMT_VERSION >= 90000
+#include <fmt/ostream.h>
+#endif
+
namespace ceph {
class Formatter;
}
#include <string_view>
#include <boost/intrusive/list.hpp>
+#if FMT_VERSION >= 90000
+#include <fmt/ostream.h>
+#endif
#include "include/Context.h"
#include "common/RefCountedObj.h"
#include "common/hobject_fmt.h"
#include "osd/osd_types.h"
#include <fmt/chrono.h>
+#if FMT_VERSION >= 90000
+#include <fmt/ostream.h>
+#endif
template <>
struct fmt::formatter<osd_reqid_t> {