https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122668

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Oops, I didn't realize it was a regression!

IIUC the underlying issue is that we don't treat the noexcept-spec of a friend
as a complete-class context, same as PR114764. And indeed r15-2117 exposed this
underlying issue in the case where the noexcept-spec does name lookup within
the current instantiation, before that commit we'd just silently repeat the
lookup at instantiation time.

> It seems like we need to treat TestClass as dependentish in this context, 
> perhaps just add TYPE_BEING_DEFINED to dependentish_scope_p?
Makes sense, maybe also '&& cp_noexcept_operand' since IIUC this particular bug
is specific to noexcept-specs.

Reply via email to