Implement N4268, Do constant evaluation of all non-type template args.
authorJason Merrill <jason@redhat.com>
Tue, 20 Oct 2015 02:48:51 +0000 (22:48 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 20 Oct 2015 02:48:51 +0000 (22:48 -0400)
commit2a9fb7125e0b0e73cc36ebbff607aa03d6e02ea4
treece34d7922020e02b9e9d7346c70ded9a6f9f13c7
parentdcdbc004d531b43e0583f8ac18def1474d64dc05
Implement N4268, Do constant evaluation of all non-type template args.

gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_nontype_template_args.
gcc/cp/
* parser.c (cp_parser_template_argument): For C++1z just parse a
constant-expression.
* pt.c (convert_nontype_argument): For C++1z always call
maybe_constant_value.

From-SVN: r229019
gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1z/nontype1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/nontype2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/nontype3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/nontype3a.C [new file with mode: 0644]