diff --git a/include/fmt/core.h b/include/fmt/core.h index 2ecc043e..1d5c6793 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -52,8 +52,8 @@ // GCC doesn't allow throw in constexpr until version 6 (bug 67371). #ifndef FMT_USE_CONSTEXPR # define FMT_USE_CONSTEXPR \ - (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_GCC_VERSION >= 600 || \ - FMT_MSC_VER >= 1910) + (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VER >= 1910 || \ + (FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L)) #endif #if FMT_USE_CONSTEXPR # define FMT_CONSTEXPR constexpr diff --git a/include/fmt/format.h b/include/fmt/format.h index 4996aba4..f0bf27af 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -116,7 +116,7 @@ #endif #if FMT_USE_USER_DEFINED_LITERALS && \ - (FMT_GCC_VERSION >= 600 || \ + ((FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L) || \ (defined(FMT_CLANG_VERSION) && FMT_CLANG_VERSION >= 304)) # define FMT_UDL_TEMPLATE 1 #else