]> granicus.if.org Git - clang/commitdiff
[c++1z] Mark constexpr lambdas as done on status page and start advertising
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 Feb 2017 23:58:29 +0000 (23:58 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 Feb 2017 23:58:29 +0000 (23:58 +0000)
them via feature test macro __cpp_constexpr.

Thanks to Faisal for implementing this feature!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295791 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitPreprocessor.cpp
test/Lexer/cxx-features.cpp
www/cxx_status.html

index 11d58ed2eb79e9ce0c1262930f40765d522abbb2..1acfe708ee888b259d1ccaf6bb70834ee0b3b6c1 100644 (file)
@@ -475,6 +475,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
     Builder.defineMacro("__cpp_user_defined_literals", "200809");
     Builder.defineMacro("__cpp_lambdas", "200907");
     Builder.defineMacro("__cpp_constexpr",
+                        LangOpts.CPlusPlus1z ? "201603" : 
                         LangOpts.CPlusPlus14 ? "201304" : "200704");
     Builder.defineMacro("__cpp_range_based_for",
                         LangOpts.CPlusPlus1z ? "201603" : "200907");
index 359deedbee7ad18fab4ae9a0e06002dee3d1bb83..d69ef08a59edbbade87797f2cd433a1697b156aa 100644 (file)
@@ -50,7 +50,7 @@
 #error "wrong value for __cpp_capture_star_this"
 #endif
 
-// FIXME: bump __cpp_constexpr to 201603 for constexpr lambda support
+// constexpr checked below
 
 #if check(if_constexpr, 0, 0, 0, 201606) // FIXME: provisional name
 #error "wrong value for __cpp_if_constexpr"
 #error "wrong value for __cpp_lambdas"
 #endif
 
-#if check(constexpr, 0, 200704, 201304, 201304)
+#if check(constexpr, 0, 200704, 201304, 201603)
 #error "wrong value for __cpp_constexpr"
 #endif
 
index 6cb87a8bc2f70d3610e43716c8f7ac8def82b587..736a08597d8c05368298c1b6f74ba0c83c3266d2 100644 (file)
@@ -648,7 +648,7 @@ as the draft C++1z standard evolves.
     <tr>
       <td><tt>constexpr</tt> lambda expressions</td>
       <td><a href="http://wg21.link/p0170r1">P0170R1</a></td>
-      <td class="none" align="center">No</td>
+      <td class="svn" align="center">SVN</td>
     </tr>
     <tr>
       <td>Differing <tt>begin</tt> and <tt>end</tt> types in range-based <tt>for</tt></td>