[Bug c++/97051] Evaluating is_constant_evaluated in requires clause fails
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 21 15:59:09 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97051
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:0c89b88daa8dffb956c77b4f22e914f42757f707
commit r10-9745-g0c89b88daa8dffb956c77b4f22e914f42757f707
Author: Patrick Palka <ppalka@redhat.com>
Date: Sat Sep 19 11:17:41 2020 -0400
c++: std::is_constant_evaluated inside constraint [PR97051]
According to [expr.const]/14, the result of substitution into an atomic
constraint is manifestly constant-evaluated; this patch adjusts the call
to maybe_constant_value in satisfy_atom to that effect.
gcc/cp/ChangeLog:
PR c++/97051
* constraint.cc (satisfy_atom): Pass true as the
manifestly_const_eval argument to maybe_constant_value.
gcc/testsuite/ChangeLog:
PR c++/97051
* g++.dg/cpp2a/is-constant-evaluated11.C: New test.
(cherry picked from commit dea470d09155f2007bdd502c16614128cb6f9348)
More information about the Gcc-bugs
mailing list