diff --git a/include/fmt/core.h b/include/fmt/core.h index 58c716d8..970fe8fa 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -204,9 +204,10 @@ FMT_BEGIN_NAMESPACE template using enable_if_t = typename std::enable_if::type; -// An enable_if helper to be used in template parameters which results in much +// enable_if helpers to be used in template parameters which results in much // shorter symbols: https://godbolt.org/z/sWw4vP. -#define FMT_ENABLE_IF(...) enable_if_t<__VA_ARGS__, int> = 0 +#define FMT_ENABLE_IF_T(...) enable_if_t<__VA_ARGS__, int> +#define FMT_ENABLE_IF(...) FMT_ENABLE_IF_T(__VA_ARGS__) = 0 namespace internal { diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index fa5eb6f3..dd34c315 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -674,7 +674,7 @@ template struct grisu_shortest_handler { } }; -template > +template FMT_API bool grisu_format(Double value, buffer& buf, int precision, unsigned options, int& exp) { FMT_ASSERT(value >= 0, "value is negative"); diff --git a/include/fmt/format.h b/include/fmt/format.h index 82f7092d..934ef851 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2246,7 +2246,7 @@ FMT_CONSTEXPR bool do_check_format_string(basic_string_view s, } template ::value, int>> + FMT_ENABLE_IF_T(is_compile_string::value)> void check_format_string(S format_str) { typedef typename S::char_type char_t; FMT_CONSTEXPR_DECL bool invalid_format =