[PATCH] D32948: [C++1z] Add speculative SD-6 feature test macro for pack expansions in using declarations

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 6 16:57:05 PDT 2017


EricWF created this revision.

This patch adds the `__cpp_variadic_using` feature test macro suggested in P0195r2. Note that this macro is not yet listed by SD-6.


https://reviews.llvm.org/D32948

Files:
  lib/Frontend/InitPreprocessor.cpp
  test/Lexer/cxx-features.cpp


Index: test/Lexer/cxx-features.cpp
===================================================================
--- test/Lexer/cxx-features.cpp
+++ test/Lexer/cxx-features.cpp
@@ -100,6 +100,10 @@
 #error "wrong value for __cpp_deduction_guides"
 #endif
 
+#if check(variadic_using, 0, 0, 0, 201611) // FIXME: provisional name
+#error "wrong value for __cpp_variadic_using"
+#endif
+
 // --- C++14 features ---
 
 #if check(binary_literals, 0, 0, 201304, 201304)
Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -527,6 +527,7 @@
     Builder.defineMacro("__cpp_fold_expressions", "201603");
     // FIXME: This is not yet listed in SD-6.
     Builder.defineMacro("__cpp_deduction_guides", "201611");
+    Builder.defineMacro("__cpp_variadic_using", "201611");
   }
   if (LangOpts.AlignedAllocation)
     Builder.defineMacro("__cpp_aligned_new", "201606");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32948.98083.patch
Type: text/x-patch
Size: 987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170506/9d6acf54/attachment-0001.bin>


More information about the cfe-commits mailing list