Class template argument deduction in new-expression
authorJason Merrill <jason@redhat.com>
Thu, 2 Mar 2017 01:58:30 +0000 (20:58 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 2 Mar 2017 01:58:30 +0000 (20:58 -0500)
commit9a642ccae4ba5ca86c58f7770fd833158530bf88
treea5e071e800e22c73c4e996eec76b100110eb382d
parent2b83483746b7b66f51ada58f5ac2a5f821154935
Class template argument deduction in new-expression

Class template argument deduction in new-expression
* init.c (build_new): Handle deduction from no initializer.
* parser.c (cp_parser_new_expression): Don't require a single
expression for class template deduction.
* typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for
class template placeholder.
* pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context.
(tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF.
(redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS.

From-SVN: r245826
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/cpp1z/class-deduction33.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/class-deduction34.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/class-deduction35.C [new file with mode: 0644]