// PR c++/97010 // { dg-do compile { target c++20 } } namespace M { struct S { int x; }; S foo (); // Test not-found-by-ADL scenario. // template // void get (S); } template void bar (const T& t) { get(t); // { dg-error ".get. was not declared in this scope" } } int main () { auto a = M::foo (); get(a); // { dg-error ".get. was not declared in this scope" } bar (a); }