diff --git a/include/fmt/core.h b/include/fmt/core.h index 1bb58793..76fedf05 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -259,9 +259,9 @@ FMT_API void assert_fail(const char* file, int line, const char* message); # ifdef NDEBUG # define FMT_ASSERT(condition, message) # else -# define FMT_ASSERT(condition, message) \ - ((condition) \ - ? void() \ +# define FMT_ASSERT(condition, message) \ + ((condition) /* void() fails with -Winvalid-constexpr on clang 4.0.1 */ \ + ? (void)0 \ : ::fmt::internal::assert_fail(__FILE__, __LINE__, (message))) # endif #endif @@ -947,12 +947,10 @@ template struct arg_mapper { map(static_cast::type>(val))) { return map(static_cast::type>(val)); } - template < - typename T, - FMT_ENABLE_IF( - !is_string::value && !is_char::value && - (has_formatter::value || - has_fallback_formatter::value))> + template ::value && !is_char::value && + (has_formatter::value || + has_fallback_formatter::value))> FMT_CONSTEXPR const T& map(const T& val) { return val; }