Feature-test macro for P0522R0, matching of template template arguments.
authorJason Merrill <jason@redhat.com>
Thu, 22 Dec 2016 20:29:02 +0000 (15:29 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 22 Dec 2016 20:29:02 +0000 (15:29 -0500)
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_template_template_args.

From-SVN: r243896

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

index acdedc8e024bb608ac61ecbbdf9385898cfdcb13..72a6803f1c7475014d96fd477f3e5019d3b1c1c7 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-22  Jason Merrill  <jason@redhat.com>
+
+       Implement P0522R0, matching of template template arguments.
+       * c-cppbuiltin.c (c_cpp_builtins): Define
+       __cpp_template_template_args.
+
 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR bootstrap/78817
index e2419e81233101f68433109f4dff13a588a4e67a..a841e534374b61e7625f23b1687bf5d05c3669f6 100644 (file)
@@ -985,6 +985,8 @@ c_cpp_builtins (cpp_reader *pfile)
          cpp_define_formatted (pfile, "__STDCPP_DEFAULT_NEW_ALIGNMENT__=%d",
                                aligned_new_threshold);
        }
+      if (flag_new_ttp)
+       cpp_define (pfile, "__cpp_template_template_args=201611");
     }
   /* Note that we define this for C as well, so that we know if
      __attribute__((cleanup)) will interface with EH.  */
index 086fd25d8932f80984cebdb4064466cf254281f0..f61b9f5db5ff0aa2a649a7e0b209f978ad5d1508 100644 (file)
 #  error "__cpp_structured_bindings != 201606"
 #endif
 
+#ifndef __cpp_template_template_args
+#  error "__cpp_template_template_args"
+#elif __cpp_template_template_args != 201611
+#  error "__cpp_template_template_args != 201611"
+#endif
+
 #ifdef __has_cpp_attribute
 
 #  if ! __has_cpp_attribute(maybe_unused)