Skip to content
Snippets Groups Projects
Commit afe1f0c2 authored by Jason Merrill's avatar Jason Merrill
Browse files

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.
parent 9e617009
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment