summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/two-stage2.C
blob: 67d8ab521132a4241da349c6af963195a467aaa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }
// PR c++/2922

char& f(char);

template<class T>
void g(T t)
{
  char& c1 = f(1);        // not dependent
  char& c2 = f(t);        // dependent
}

int&f (int);

int main()
{
  g(2);    // two f(char)
  g('a');  // two f(char)
}