diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-22 20:29:02 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-22 20:29:02 +0000 |
commit | 23ea3d015dbd98d9bf6b85fdceb65389f4909d89 (patch) | |
tree | 3cdb99ea889df9edb38bd3c890d789702e7cf9f5 | |
parent | 9c6ba5bf60d35afce20f8bee7e2bb2ac2efe37a4 (diff) | |
download | gcc-23ea3d015dbd98d9bf6b85fdceb65389f4909d89.tar.gz |
Feature-test macro for P0522R0, matching of template template arguments.
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_template_template_args.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243896 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-cppbuiltin.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index acdedc8e024..72a6803f1c7 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -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 diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index e2419e81233..a841e534374 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -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. */ diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C index 086fd25d893..f61b9f5db5f 100644 --- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C +++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C @@ -398,6 +398,12 @@ # 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) |