fmt 10.0.0-10.1.1 compile fixes

Implicit conversion operators and enums was removed for parity with std::format (fce74caa15).
This commit is contained in:
get
2023-06-11 21:51:49 -05:00
committed by Admiral H. Curtiss
parent 965283c263
commit 63467559b2
8 changed files with 38 additions and 8 deletions

View File

@ -16,6 +16,8 @@
#include <endian.h>
#endif
#include <fmt/format.h>
#include "Common/CommonTypes.h"
namespace Common
@ -183,3 +185,15 @@ private:
value_type raw;
};
} // Namespace Common
template <typename value_type>
struct fmt::formatter<Common::BigEndianValue<value_type>>
{
fmt::formatter<value_type> m_formatter;
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
template <typename FormatContext>
auto format(const Common::BigEndianValue<value_type>& value, FormatContext& ctx) const
{
return m_formatter.format(value.operator value_type(), ctx);
}
};