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

c++: fix alias CTAD [PR105841]


In my initial implementation of alias CTAD, I described a couple of
differences from the specification that I thought would not have a practical
effect; this testcase demonstrates that I was wrong.  One difference is
resolved by the CPTK_IS_DEDUCIBLE commit; the other (adding too many of the
alias template parameters to the new deduction guide) is fixed by this
patch.

	PR c++/105841

gcc/cp/ChangeLog:

	* pt.cc	(corresponding_template_parameter_list): Split out...
	(corresponding_template_parameter): ...from here.
	(find_template_parameters): Factor out...
	(find_template_parameter_info::find_in): ...this function.
	(find_template_parameter_info::find_in_recursive): New.
	(find_template_parameter_info::found): New.
	(alias_ctad_tweaks): Only add parms used in the deduced args.

gcc/testsuite/ChangeLog:

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

Co-authored-by: default avatarMichael Spertus <mike@spertus.com>
parent 30556bf8
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