diff --git a/fmt/format.h b/fmt/format.h index 907911fe..6c32ecc1 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -3575,6 +3575,12 @@ const Char *do_format_arg(basic_buffer &buffer, return pointer_from(it); } +// Specifies whether to format T using the standard formatter. +// It is not possible to use gettype in formatter specialization directly +// because of a bug in MSVC. +template +struct format_type : std::integral_constant() != CUSTOM> {}; + // Specifies whether to format enums. template struct format_enum : std::integral_constant::value> {}; @@ -3582,8 +3588,7 @@ struct format_enum : std::integral_constant::value> {}; // Formatter of objects of type T. template -struct formatter() != internal::CUSTOM>::type> { +struct formatter::value>::type> { // Parses format specifiers stopping either at the end of the range or at the // terminating '}'. diff --git a/fmt/ostream.h b/fmt/ostream.h index f52e03d5..e7e0b8e7 100644 --- a/fmt/ostream.h +++ b/fmt/ostream.h @@ -87,8 +87,7 @@ struct format_enum struct formatter() == internal::CUSTOM>::type> + typename std::enable_if::value>::type> : formatter, Char> { void format(basic_buffer &buf, const T &value,