summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/koenig7.C
blob: 61b68d8032ca53b7234091cef681b04a65098986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do run  }
// Test for Koenig lookup involving overloaded functions.

namespace N1 {
  struct A { };
  void f1(A) {}
  void f2(float) {}
  void g(void (*)(float)) {}
}

using N1::f1;
void f1(float) {}

using N1::f2;
template <class T>
void f2(N1::A, T) {}

void g(void (*)(int)) {}

int main() {  
   g(&f1); // Works?
   g(f2); // Works?
}