[libcxx] r250802 - Detect relaxed constexpr rules for gcc versions
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 00:37:16 PDT 2015
Author: marshall
Date: Tue Oct 20 02:37:11 2015
New Revision: 250802
URL: http://llvm.org/viewvc/llvm-project?rev=250802&view=rev
Log:
Detect relaxed constexpr rules for gcc versions
Modified:
libcxx/trunk/include/__config
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=250802&r1=250801&r2=250802&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue Oct 20 02:37:11 2015
@@ -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
More information about the cfe-commits
mailing list