C++ PATCH to update __cpp_deduction_guides

Message ID CADzB+2=d2Py6LP8qtrngD79B33UBPp7GTi48V-r-VYXLgV1PqQ@mail.gmail.com
State New
Headers show
Series
  • C++ PATCH to update __cpp_deduction_guides
Related show

Commit Message

Jason Merrill Feb. 15, 2018, 6:14 p.m.
I implemented P0512 back in July, but forgot to update the value of
the feature-test macro.
commit 1d440f3731f7350426a019be7bbb636d1db47808
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Feb 15 13:11:52 2018 -0500

            * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.

Patch

diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 0624c006278..3fc4fa9cd68 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -970,7 +970,7 @@  c_cpp_builtins (cpp_reader *pfile)
 	  cpp_define (pfile, "__cpp_capture_star_this=201603");
 	  cpp_define (pfile, "__cpp_inline_variables=201606");
 	  cpp_define (pfile, "__cpp_aggregate_bases=201603");
-	  cpp_define (pfile, "__cpp_deduction_guides=201606");
+	  cpp_define (pfile, "__cpp_deduction_guides=201611");
 	  cpp_define (pfile, "__cpp_noexcept_function_type=201510");
 	  cpp_define (pfile, "__cpp_template_auto=201606");
 	  cpp_define (pfile, "__cpp_structured_bindings=201606");
diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
index b2f046b5c91..2ab1b4e3e86 100644
--- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
+++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
@@ -358,8 +358,8 @@ 
 
 #ifndef __cpp_deduction_guides
 #  error "__cpp_deduction_guides"
-#elif __cpp_deduction_guides != 201606
-#  error "__cpp_deduction_guides != 201606"
+#elif __cpp_deduction_guides != 201611
+#  error "__cpp_deduction_guides != 201611"
 #endif
 
 #ifndef __cpp_if_constexpr