blob: 62cc81db0c75d18f8632b5d38c7935e0fd359a87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// PR c++/97010
// { dg-do compile { target c++20 } }
namespace M {
struct S { int x; };
S foo ();
// Test not-found-by-ADL scenario.
// template<typename>
// void get (S);
}
template<typename T>
void bar (const T& t)
{
get<int>(t); // { dg-error ".get. was not declared in this scope" }
}
int
main ()
{
auto a = M::foo ();
get<int>(a); // { dg-error ".get. was not declared in this scope" }
bar (a);
}
|