PR c++/52343 - error with alias template as template template argument
authorDodji Seketeli <dodji@redhat.com>
Mon, 7 Jan 2013 08:03:33 +0000 (08:03 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Mon, 7 Jan 2013 08:03:33 +0000 (09:03 +0100)
commit36b21740b4756881c0e35e3cb87d77fac3d1d731
tree9b289b525a47a504b542d1b8e5f6ac7cbebcb50e
parent78aff3368069ecca868e9fa9d5f7b724c4c4c2c9
PR c++/52343 - error with alias template as template template argument

In the example accompanying this patch, check_instantiated_arg tries
to ensure that a non-type template argument should be a constant if it
has integral or enumeration type.

The problem is that an alias template which type-id is, e.g, an
integer, looks like an argument that has integral/enumeration type:
its TREE_TYPE is an integer type.  So check_instantiated_arg
mistenkaly barks that this integral non-type argument is not a
constant.

Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.

gcc/cp/

PR c++/52343
* pt.c (check_instantiated_arg): Allow type template arguments.

gcc/testsuite/

PR c++/52343
* g++.dg/cpp0x/alias-decl-29.C: New test.

From-SVN: r194960
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C [new file with mode: 0644]