From 10d00346ba5cb4b446ee9485e2f9992b479e9f44 Mon Sep 17 00:00:00 2001 From: Arthurdead Date: Mon, 3 Jun 2019 00:48:58 -0300 Subject: [PATCH] Add back FMT_ENABLE_IF_T from PR #1150 --- include/fmt/core.h | 3 ++- include/fmt/format-inl.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 0c27af76..9f78e548 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -206,7 +206,8 @@ using enable_if_t = typename std::enable_if<(B), T>::type; // An enable_if helper 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");