Add __cpp_structured_bindings feature test macro for structured bindings, per
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 19 Dec 2016 04:21:36 +0000 (04:21 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 19 Dec 2016 04:21:36 +0000 (04:21 +0000)
latest (provisional) draft of SD-6.

llvm-svn: 290082

clang/lib/Frontend/InitPreprocessor.cpp
clang/test/Lexer/cxx-features.cpp

index d8102cc..17603ad 100644 (file)
@@ -519,6 +519,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
     Builder.defineMacro("__cpp_nested_namespace_definitions", "201411");
     Builder.defineMacro("__cpp_variadic_using", "201611");
     Builder.defineMacro("__cpp_aggregate_bases", "201603");
+    Builder.defineMacro("__cpp_structured_bindings", "201606");
     Builder.defineMacro("__cpp_nontype_template_args", "201411");
     Builder.defineMacro("__cpp_fold_expressions", "201603");
   }
index 8f1e286..5fc1722 100644 (file)
 #error "wrong value for __cpp_nested_namespace_definitions"
 #endif
 
+// inheriting_constructors checked below
+
 #if check(aggregate_bases, 0, 0, 0, 201603)
 #error "wrong value for __cpp_aggregate_bases"
 #endif
 
-// FIXME: structured_bindings / decomposition_decl name not yet settled
+#if check(structured_bindings, 0, 0, 0, 201606)
+#error "wrong value for __cpp_structured_bindings"
+#endif
 
 #if check(nontype_template_args, 0, 0, 0, 201411)
 #error "wrong value for __cpp_nontype_template_args"