summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/ns18.C
blob: 192fa4291a5d915eefbc29988325e222cda8d087 (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
26
27
28
29
30
// { dg-do assemble  }
// Origin: Theo Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>

namespace Bname {
  class B;
}

template <class T>
class A {
  friend class Bname::B;
  static const int a = 1;
public:
  A() { }
};

namespace Bname {
  class B {
  	int a;
  public:
  	template<class T>
  	B(const T&):a(T::a) { }
  };
}

int
main()
{
  A<int> a;
  Bname::B b(a);
}