From 229887bd407f822fc093de6a638a369ac936d549 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 14 Feb 2018 05:46:41 -0800 Subject: [PATCH] Make constexpr remove_prefix gcc version check tighter (#648) --- include/fmt/core.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 95d8aac4..efd44385 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -147,9 +147,10 @@ (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910) # include namespace fmt { using std::basic_string_view; } -// std::experimental::basic_string_view::remove_prefix isn't constexpr in gcc 6. +// std::experimental::basic_string_view::remove_prefix isn't constexpr until +// gcc 7.3. #elif (FMT_HAS_INCLUDE() && \ - (FMT_GCC_VERSION == 0 || FMT_GCC_VERSION >= 700) && \ + (FMT_GCC_VERSION == 0 || FMT_GCC_VERSION >= 730) && \ __cplusplus >= 201402L) # include namespace fmt { using std::experimental::basic_string_view; } @@ -1065,8 +1066,8 @@ inline internal::named_arg arg(wstring_view name, const T &arg) { // This function template is deleted intentionally to disable nested named // arguments as in ``format("{}", arg("a", arg("b", 42)))``. -template -void arg(S, internal::named_arg) FMT_DELETED; +template +void arg(S, internal::named_arg) FMT_DELETED; enum Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE };