c++: No aggregate CTAD with explicit dguide [PR98802]
authorJason Merrill <jason@redhat.com>
Thu, 4 Feb 2021 02:56:59 +0000 (21:56 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 4 Feb 2021 03:03:40 +0000 (22:03 -0500)
commit787f3ebf00d4e1f741ea03b6ddea9cf07a6f94ac
tree64633bcfe3be8bf6212c9982bd8d52b2659b2b47
parent7b258ac7afaaf7d8157df10ea35c6002d935d7d0
c++: No aggregate CTAD with explicit dguide [PR98802]

In my implementation of P2082R1 I missed this piece: the aggregate deduction
candidate is not generated if the class has user-written deduction guides.

gcc/cp/ChangeLog:

PR c++/98802
* pt.c (do_class_deduction): No aggregate guide if any_dguides_p.

gcc/testsuite/ChangeLog:

PR c++/98802
* g++.dg/cpp1z/class-deduction78.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1z/class-deduction78.C [new file with mode: 0644]