[Bug c++/93976] Implement P2082R1, Fixing CTAD for aggregates
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 23 21:49:52 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93976
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:6b161257f9f8c7a26b7d119ebc32cbbc54d2e508
commit r11-1615-g6b161257f9f8c7a26b7d119ebc32cbbc54d2e508
Author: Jason Merrill <jason@redhat.com>
Date: Mon Jun 22 15:44:45 2020 -0400
c++: Improve CTAD for aggregates [PR93976]
P2082R1 adjusted the rules for class template argument deduction for an
aggregate to better handle arrays and pack expansions.
gcc/cp/ChangeLog:
PR c++/93976
Implement C++20 P2082R1, Fixing CTAD for aggregates.
* cp-tree.h (TPARMS_PRIMARY_TEMPLATE): Split out from...
(DECL_PRIMARY_TEMPLATE): ...here.
(builtin_guide_p): Declare.
* decl.c (reshape_init_class): Handle bases of a template.
(reshape_init_r): An array with dependent bound takes a single
initializer.
* pt.c (tsubst_default_argument): Shortcut {}.
(unify_pack_expansion): Allow omitted arguments to trailing pack.
(builtin_guide_p): New.
(collect_ctor_idx_types): Give a trailing pack a {} default
argument. Handle arrays better.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/class-deduction-aggr3.C: New test.
* g++.dg/cpp2a/class-deduction-aggr4.C: New test.
More information about the Gcc-bugs
mailing list