https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21802
--- Comment #4 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> --- EDG accepts this (which I believe is the correct answer). Clang and GCC reject (in Clang's case, the callee is resolved in the template definition, but then ADL is accidentally performed during template instantiation; I've not looked into where this goes wrong for GCC). The bug seems valid to me.