From e363df3fd372a6423258cd9138e85a44a1ab224b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 10 Jan 2017 14:04:28 -0500 Subject: [PATCH] * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using. From-SVN: r244283 --- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-cppbuiltin.c | 1 + gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 968d4839834..a7f2f0d6eb1 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2017-01-10 Jason Merrill + + Implement P0195R2, C++17 variadic using. + * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using. + 2017-01-09 Jakub Jelinek PR translation/79019 diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 2115099a556..c114bbd6d88 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -970,6 +970,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_noexcept_function_type=201510"); cpp_define (pfile, "__cpp_template_auto=201606"); cpp_define (pfile, "__cpp_structured_bindings=201606"); + cpp_define (pfile, "__cpp_variadic_using=201611"); } if (flag_concepts) cpp_define (pfile, "__cpp_concepts=201507"); diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C index f61b9f5db5f..e424e1c0ff0 100644 --- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C +++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C @@ -404,6 +404,12 @@ # error "__cpp_template_template_args != 201611" #endif +#ifndef __cpp_variadic_using +# error "__cpp_variadic_using" +#elif __cpp_variadic_using != 201611 +# error "__cpp_variadic_using != 201611" +#endif + #ifdef __has_cpp_attribute # if ! __has_cpp_attribute(maybe_unused) -- 2.30.2