6 #include <fmt/format.h>
7 #include <fmt/ostream.h>
8 #include <fmt/ranges.h>
11 #include <boost/filesystem.hpp>
28 #if defined(FMT_VERSION) && FMT_VERSION >= 100000
29 # define FMT_CONST_IF_REQUIRED const
31 # define FMT_CONST_IF_REQUIRED
38 struct fmt::formatter<
boost::filesystem::path> : fmt::formatter<std::string>
40 template<
typename FormatContext>
41 auto format(
const boost::filesystem::path & p, FormatContext & ctx) FMT_CONST_IF_REQUIRED
43 return fmt::formatter<std::string>::format(p.string(), ctx);
51 struct fmt::formatter<
std::filesystem::path> : fmt::formatter<std::string>
53 template<
typename FormatContext>
54 auto format(
const std::filesystem::path & p, FormatContext & ctx) FMT_CONST_IF_REQUIRED
56 return fmt::formatter<std::string>::format(p.string(), ctx);
60 #if FMT_VERSION >= 9 * 10000
65 # define MC_FMT_STREAMED(X) fmt::streamed(X)
70 struct fmt::formatter<T, char,
std::enable_if_t<std::is_base_of_v<Eigen::EigenBase<T>, T>>> : fmt::ostream_formatter
77 template<
typename T,
typename Char>
78 struct fmt::range_format_kind<T, Char,
std::enable_if_t<std::is_base_of_v<Eigen::EigenBase<T>, T>>>
79 : std::integral_constant<fmt::range_format, fmt::range_format::disabled>
83 # define MC_FMT_OSTREAM_FORMATTER(TYPE) \
85 struct fmt::formatter<TYPE> : fmt::ostream_formatter \
101 # define MC_FMT_STREAMED(X) X