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

c++: excessive satisfaction in check_methods [PR108579]

In check_methods we're unnecessarily checking satisfaction for all
constructors and assignment operators, even those that don't look like
copy/move special members.  In the testcase below this manifests as an
unstable satisfaction error because the satisfaction result is first
determined to be false during check_methods (since A<int> is incomplete
at this point) and later true after completion of A<int>.

This patch fixes this simply by swapping the order of the
constraint_satisfied_p and copy/move_fn_p tests.

	PR c++/108579

gcc/cp/ChangeLog:

	* class.cc (check_methods): Swap order of constraints_satisfied_p
	and copy/move_fn_p tests.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/concepts-pr108579.C: New test.
parent e8109bd8
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