[Bug c++/102529] ctad for aliases fails in the presence of constraints
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 9 15:28:03 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102529
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:afe1f0c251d0429069c2414d4f3f14042efc174f
commit r13-6556-gafe1f0c251d0429069c2414d4f3f14042efc174f
Author: Jason Merrill <jason@redhat.com>
Date: Thu Feb 9 12:58:35 2023 -0800
c++: CTAD for less-specialized alias template [PR102529]
The standard was unclear what happens with the transformation of a
deduction
guide if the initial template argument deduction fails for a reason other
than not deducing all the arguments; my implementation assumed that the
right thing was to give up on the deduction guide. But in consideration of
CWG2664 this week I realized that we get a better result by just continuing
with an empty set of deductions, so the alias deduction guide is the same
as
the original deduction guide plus the deducible constraint.
DR 2664
PR c++/102529
gcc/cp/ChangeLog:
* pt.cc (alias_ctad_tweaks): Continue after deduction failure.
gcc/testsuite/ChangeLog:
* g++.dg/DRs/dr2664.C: New test.
* g++.dg/cpp2a/class-deduction-alias15.C: New test.
More information about the Gcc-bugs
mailing list