c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases and __cpp_deduction_guides.
authorJason Merrill <jason@redhat.com>
Fri, 14 Oct 2016 22:02:01 +0000 (18:02 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 14 Oct 2016 22:02:01 +0000 (18:02 -0400)
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
and __cpp_deduction_guides.

From-SVN: r241188

gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C

index e4ba2de334d571d43e3e59b52971aaef7edc631f..475cd7d48609df75020f11ac87a3fd578f89ea1e 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-14  Jason Merrill  <jason@redhat.com>
+
+       * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
+       and __cpp_deduction_guides.
+
 2016-10-13  Jason Merrill  <jason@redhat.com>
 
        * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
index 06b5aa3ac6518028d4eccfcac84f898fae9e370e..4179a32f35660b5b73b9ea3e6b0853aa681d81af 100644 (file)
@@ -936,6 +936,8 @@ c_cpp_builtins (cpp_reader *pfile)
          cpp_define (pfile, "__cpp_if_constexpr=201606");
          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");
        }
       if (flag_concepts)
        /* Use a value smaller than the 201507 specified in
index c86dbe2c9111c34596c6a8a150ba37d9fbb8a607..e023e6a622df6520247c2717ef5cded3cb619eb0 100644 (file)
 #  error "__cpp_hex_float != 201603"
 #endif
 
+#ifndef __cpp_aggregate_bases
+#  error "__cpp_aggregate_bases"
+#elif __cpp_aggregate_bases != 201603
+#  error "__cpp_aggregate_bases != 201603"
+#endif
+
+#ifndef __cpp_deduction_guides
+#  error "__cpp_deduction_guides"
+#elif __cpp_deduction_guides != 201606
+#  error "__cpp_deduction_guides != 201606"
+#endif
+
 #ifndef __cpp_if_constexpr
 #  error "__cpp_if_constexpr"
 #elif __cpp_if_constexpr != 201606