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

c++: constraints are unevaluated operands [PR99961]

According to [temp.concept]/6 and [temp.pre]/9, a concept definition and
a requires clause are both unevaluated contexts, and hence satisfaction
deals only with unevaluated operands, so we should set cp_unevaluated in
these three situations.

gcc/cp/ChangeLog:

	PR c++/99961
	PR c++/99994
	* constraint.cc (satisfy_normalized_constraints): Set
	cp_unevaluated.
	* parser.c (cp_parser_concept_definition): Likewise.
	(cp_parser_requires_clause_opt): Likewise.

gcc/testsuite/ChangeLog:

	PR c++/99961
	PR c++/99994
	* g++.dg/cpp2a/concepts-uneval1.C: New test.
	* g++.dg/cpp2a/concepts-uneval2.C: New test.
parent 07b27384
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