summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/koenig6.C
blob: 9fdf771e0cf3bf43387fd4a14e85be55de5ada55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/17365
// ADL should not find B::N.

namespace A
{
  namespace B
  {
    template <typename T> struct N {int n_;};
  }
  template <typename T> int N( T p ) { return p->n_; }
  template <typename T> void f( T p ) { N(p); }  // #1
}
int main()
{
  A::B::N<int> n;
  A::f(&n);
  return 0;
}