From 044661470666ec07f85ddc894a849a7cdfc501e6 Mon Sep 17 00:00:00 2001 From: Alexey Ochapov Date: Wed, 23 Dec 2020 22:35:34 +0300 Subject: [PATCH] use is not custom mapped type check --- include/fmt/format.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index f5835d9d..42f0bdac 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2111,15 +2111,12 @@ FMT_CONSTEXPR OutputIt write(OutputIt out, T value) { return base_iterator(out, it); } -template ::value && - !std::is_same::value && - !std::is_same::value)> -#else - FMT_ENABLE_IF(std::is_enum::value && - !std::is_same::value)> -#endif +template < + typename Char, typename OutputIt, typename T, + FMT_ENABLE_IF( + std::is_enum::value && !std::is_same::value && + mapped_type_constant>::value != + type::custom_type)> FMT_CONSTEXPR OutputIt write(OutputIt out, T value) { return write( out, static_cast::type>(value));