diff options
author | Jason Merrill <jason@redhat.com> | 2016-12-22 15:29:02 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-12-22 15:29:02 -0500 |
commit | 67a5ad7cbdef324726772a35b03474f51c3e1a46 (patch) | |
tree | 3cdb99ea889df9edb38bd3c890d789702e7cf9f5 /gcc | |
parent | dd809fdeca8088bb91e6414d834e3e322dcdf14c (diff) | |
download | gcc-67a5ad7cbdef324726772a35b03474f51c3e1a46.zip gcc-67a5ad7cbdef324726772a35b03474f51c3e1a46.tar.gz gcc-67a5ad7cbdef324726772a35b03474f51c3e1a46.tar.bz2 |
Feature-test macro for P0522R0, matching of template template arguments.
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_template_template_args.
From-SVN: r243896
Diffstat (limited to 'gcc')
-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 acdedc8..72a6803 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 e2419e8..a841e53 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 086fd25..f61b9f5 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) |