[Bug c++/40177] ADL with non-unqualified-id

2021-08-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40177 --- Comment #2 from Andrew Pinski --- GCC accept the original testcase now in C++20 mode since GCC 9+ and reject it in C++98, C++11, C++14, and C++17 modes. Clang also rejects it in < C++20 but with a decent error message: :2:14: error: use of fu

[Bug c++/40177] ADL with non-unqualified-id

2009-11-05 Thread jason at gcc dot gnu dot org
--- Comment #1 from jason at gcc dot gnu dot org 2009-11-05 22:11 --- I agree: before we can do ADL we need to know that f is a template name, so we need another declaration of f to be found by unqualified lookup, i.e. something like template void f(T,T); It is correct to do ADL once