Skip to content
Snippets Groups Projects
Commit 465b9c51 authored by Patrick Palka's avatar Patrick Palka
Browse files

c++: NTTP type CTAD w/ tmpl from current inst [PR113649]


Since template argument coercion happens relative to the most general
template (for a class template at least), during NTTP type CTAD we might
need to consider outer arguments particularly if the CTAD template is from
the current instantiation (and so depends on outer template parameters).

This patch makes do_class_deduction substitute as many levels of outer
template arguments into a CTAD template (from the current instantiation)
as it can take.

	PR c++/113649

gcc/cp/ChangeLog:

	* pt.cc (do_class_deduction): Add outer_targs parameter.
	Substitute outer arguments into the CTAD template.
	(do_auto_deduction): Pass outer_targs to do_class_deduction.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/nontype-class65.C: New test.

Reviewed-by: default avatarJason Merrill <jason@redhat.com>
parent d2d5ef6e
No related branches found
No related tags found
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