summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/member8.C
blob: 074c65543041caf87f0d49aed9141ec3f7974c1a (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++/35138
// { dg-do compile }

namespace N1 { struct A { }; }
namespace N2 { struct A { }; }
using namespace N1;
using namespace N2;

template <typename T> int
foo (T const &t)
{
  return t.A;
}

struct B
{
  int A;
};

int
main ()
{
  B b;
  foo (b);
}