public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/98832] New: CTAD fails for alias template of aggregate with specified undeducible template parameter @ 2021-01-26 4:46 johelegp at gmail dot com 2021-06-24 14:18 ` [Bug c++/98832] " ppalka at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: johelegp at gmail dot com @ 2021-01-26 4:46 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98832 Bug ID: 98832 Summary: CTAD fails for alias template of aggregate with specified undeducible template parameter Product: gcc Version: 11.0 URL: https://godbolt.org/z/M1eqvq Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/M1eqvq. ```C++ template<class T,class U>struct X{U u;}; template<class T>using Y=X<int,T>; Y y{0}; ``` ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98832] CTAD fails for alias template of aggregate with specified undeducible template parameter 2021-01-26 4:46 [Bug c++/98832] New: CTAD fails for alias template of aggregate with specified undeducible template parameter johelegp at gmail dot com @ 2021-06-24 14:18 ` ppalka at gcc dot gnu.org 2021-06-24 17:13 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: ppalka at gcc dot gnu.org @ 2021-06-24 14:18 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98832 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2021-06-24 --- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> --- Confirmed. It looks like we're overlooking the aggregate deduction candidate for the underlying template when building the set of guides for the alias. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98832] CTAD fails for alias template of aggregate with specified undeducible template parameter 2021-01-26 4:46 [Bug c++/98832] New: CTAD fails for alias template of aggregate with specified undeducible template parameter johelegp at gmail dot com 2021-06-24 14:18 ` [Bug c++/98832] " ppalka at gcc dot gnu.org @ 2021-06-24 17:13 ` cvs-commit at gcc dot gnu.org 2021-07-13 14:03 ` cvs-commit at gcc dot gnu.org 2021-07-13 14:07 ` ppalka at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-06-24 17:13 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98832 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:c761be53f6b62e22ac5de18c4aaf88648f64f5b7 commit r12-1793-gc761be53f6b62e22ac5de18c4aaf88648f64f5b7 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98832] CTAD fails for alias template of aggregate with specified undeducible template parameter 2021-01-26 4:46 [Bug c++/98832] New: CTAD fails for alias template of aggregate with specified undeducible template parameter johelegp at gmail dot com 2021-06-24 14:18 ` [Bug c++/98832] " ppalka at gcc dot gnu.org 2021-06-24 17:13 ` cvs-commit at gcc dot gnu.org @ 2021-07-13 14:03 ` cvs-commit at gcc dot gnu.org 2021-07-13 14:07 ` ppalka at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-07-13 14:03 UTC (permalink / raw) To: gcc-bugs 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) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98832] CTAD fails for alias template of aggregate with specified undeducible template parameter 2021-01-26 4:46 [Bug c++/98832] New: CTAD fails for alias template of aggregate with specified undeducible template parameter johelegp at gmail dot com ` (2 preceding siblings ...) 2021-07-13 14:03 ` cvs-commit at gcc dot gnu.org @ 2021-07-13 14:07 ` ppalka at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: ppalka at gcc dot gnu.org @ 2021-07-13 14:07 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98832 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |11.2 --- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> --- Fixed for 11.2/12 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-13 14:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-01-26 4:46 [Bug c++/98832] New: CTAD fails for alias template of aggregate with specified undeducible template parameter johelegp at gmail dot com 2021-06-24 14:18 ` [Bug c++/98832] " ppalka at gcc dot gnu.org 2021-06-24 17:13 ` cvs-commit at gcc dot gnu.org 2021-07-13 14:03 ` cvs-commit at gcc dot gnu.org 2021-07-13 14:07 ` ppalka at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).