diff --git a/include/fmt/format.h b/include/fmt/format.h index 42f0bdac..68ca2e56 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2111,12 +2111,14 @@ FMT_CONSTEXPR OutputIt write(OutputIt out, T value) { return base_iterator(out, it); } +// FMT_ENABLE_IF() condition separated to workaround MSVC bug template < typename Char, typename OutputIt, typename T, - FMT_ENABLE_IF( + bool check = std::is_enum::value && !std::is_same::value && mapped_type_constant>::value != - type::custom_type)> + type::custom_type, + FMT_ENABLE_IF(check)> FMT_CONSTEXPR OutputIt write(OutputIt out, T value) { return write( out, static_cast::type>(value));