[Bug c++/104111] [DR2589] Concept evaluation depends on context where it was first checked
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 13 17:25:51 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104111
--- Comment #11 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Along the lines of comment #3, here's another example that would "misbehave" if
we were to make concept-id evaluation context-independent:
template<class T> requires C<T> || D<T>
void f() {
if constexpr (C<T>) // potentially IFNDR if evaluation of C<T>
// depends on access context of f (though
// in practice we'll just reuse the cached
// value obtained earlier during satisfaction
// with the right access context)
...
else
...
}
More information about the Gcc-bugs
mailing list