[Bug c++/98832] CTAD fails for alias template of aggregate with specified undeducible template parameter

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 13 14:03:28 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98832

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:660cbbae327fbfa315e26d286b03efffc3c21cb5

commit r11-8730-g660cbbae327fbfa315e26d286b03efffc3c21cb5
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Jun 24 13:11:44 2021 -0400

    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)


More information about the Gcc-bugs mailing list