]> gcc.gnu.org Git - gcc.git/commit
c++: alias CTAD and aggregate deduction cand [PR98832]
authorPatrick Palka <ppalka@redhat.com>
Thu, 24 Jun 2021 17:11:44 +0000 (13:11 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 13 Jul 2021 13:53:27 +0000 (09:53 -0400)
commit660cbbae327fbfa315e26d286b03efffc3c21cb5
treeb85b0c4401838870aba9b9129837d5854f7b9f2d
parent0f00006c007f3f7e9b6fdd9906ed1e4c791f6b15
c++: alias CTAD and aggregate deduction cand [PR98832]

During alias CTAD, we're accidentally ignoring the aggregate deduction
candidate for the underlying template because this guide is added
separately via maybe_aggr_guide (which doesn't yet handle alias
templates) instead of via deduction_guides_for (which does).  This patch
makes maybe_aggr_guide handle alias templates in a manner similar to
deduction_guides_for.

PR c++/98832

gcc/cp/ChangeLog:

* pt.c (maybe_aggr_guide): Handle alias templates appropriately.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/class-deduction-alias9.C: New test.

(cherry picked from commit c761be53f6b62e22ac5de18c4aaf88648f64f5b7)
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/class-deduction-alias9.C [new file with mode: 0644]
This page took 0.058308 seconds and 5 git commands to generate.