https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90769
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> --- I think this issue can be distilled into the following testcase: enum E { }; template<class> int f(E e) { return e + e; } int operator+(E, E) = delete; // #1 template int f<void>(E); For e + e, should ADL be performed at instantiation time and therefore find the later-declared #1? GCC, Clang and MSVC all appear to perform ADL here, and they all reject this testcase. I'm not sure but I think ADL shouldn't be performed here since since the operator expression is non-dependent.