Debian Codegraph @

gcc/testsuite/g++.dg/lookup/two-stage1.C

raw
1 /* PR c++/2437 */
2 /* { dg-do run } */
3
4 // Test of two-stage name lookup.
5
6 int g(double) { return 0; }
7
8 template <class T> struct X
9 {
10 int f() { return g(2); } // should call g(double)
11 };
12
13 inline int g(int) { return 1; }
14
15 int main()
16 {
17 return X<int>().f(); // should call g(double), but used to call g(int)
18 }