use is not custom mapped type check

This commit is contained in:
Alexey Ochapov 2020-12-23 22:35:34 +03:00
parent 0e89adaa66
commit 0446614706
No known key found for this signature in database
GPG Key ID: 9DC52E8F031B8DA8

View File

@ -2111,15 +2111,12 @@ FMT_CONSTEXPR OutputIt write(OutputIt out, T value) {
return base_iterator(out, it); return base_iterator(out, it);
} }
template <typename Char, typename OutputIt, typename T, template <
#ifdef __cpp_lib_byte typename Char, typename OutputIt, typename T,
FMT_ENABLE_IF(std::is_enum<T>::value && FMT_ENABLE_IF(
!std::is_same<T, Char>::value && std::is_enum<T>::value && !std::is_same<T, Char>::value &&
!std::is_same<T, std::byte>::value)> mapped_type_constant<T, basic_format_context<OutputIt, Char>>::value !=
#else type::custom_type)>
FMT_ENABLE_IF(std::is_enum<T>::value &&
!std::is_same<T, Char>::value)>
#endif
FMT_CONSTEXPR OutputIt write(OutputIt out, T value) { FMT_CONSTEXPR OutputIt write(OutputIt out, T value) {
return write<Char>( return write<Char>(
out, static_cast<typename std::underlying_type<T>::type>(value)); out, static_cast<typename std::underlying_type<T>::type>(value));