From 1c4526757e7e281e75a713a9c63962aa8f4087d5 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 20 Oct 2015 07:37:11 +0000 Subject: [PATCH] Detect relaxed constexpr rules for gcc versions llvm-svn: 250802 --- libcxx/include/__config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcxx/include/__config b/libcxx/include/__config index bc01805f7687..b7e3532729de 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -451,8 +451,11 @@ namespace std { #define _LIBCPP_HAS_NO_CONSTEXPR #endif -// No version of GCC supports relaxed constexpr rules +// Determine if GCC supports relaxed constexpr +#if !defined(__cpp_constexpr) || __cpp_constexpr < 201304L #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR +#endif + // GCC 5 will support variable templates #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES