Merge pull request #10367 from Pokechu22/fmt-8.1.1

Update to fmt 8.1.1
This commit is contained in:
JosJuice
2022-01-20 21:14:41 +01:00
committed by GitHub
80 changed files with 10311 additions and 6848 deletions

View File

@ -23,7 +23,7 @@
* template <>
* struct fmt::formatter<Foo> : EnumFormatter<Foo::C>
* {
* formatter() : EnumFormatter({"A", "B", "C"}) {}
* constexpr formatter() : EnumFormatter({"A", "B", "C"}) {}
* };
*
* enum class Bar
@ -39,7 +39,7 @@
* // using std::array here fails due to nullptr not being const char*, at least in MSVC
* // (but only when a field is used; directly in the constructor is OK)
* static constexpr array_type names = {"D", "E", nullptr, "F"};
* formatter() : EnumFormatter(names) {}
* constexpr formatter() : EnumFormatter(names) {}
* };
*/
template <auto last_member, typename = decltype(last_member)>
@ -62,7 +62,7 @@ public:
}
template <typename FormatContext>
auto format(const T& e, FormatContext& ctx)
auto format(const T& e, FormatContext& ctx) const
{
const auto value_s = static_cast<std::underlying_type_t<T>>(e); // Possibly signed
const auto value_u = static_cast<std::make_unsigned_t<T>>(value_s); // Always unsigned