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

c++: local_specializations and recursive constrained fn [PR103714]

Here during constraint checking for the inner call to A<0>::f<0>,
substitution into the PARM_DECL d in the atomic constraint yields the
wrong local specialization because local_specializations at this point
is nonempty, and contains specializations for the caller A<0>::f<1>.

This patch makes us call push_to_top_level during satisfaction, which'll
temporarily clear local_specializations for us.

	PR c++/103714

gcc/cp/ChangeLog:

	* constraint.cc (satisfy_declaration_constraints): Do
	push_to_top_level and pop_from_top_level around the call to
	satisfy_normalized_constraints.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/concepts-uneval5.C: New test.
parent ba64166b
No related branches found
No related tags found
No related merge requests found
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