aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/friend7.C
blob: a954f8990c5d3ff0a5b31ff03115af2cd7a981b3 (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
31
32
33
// { dg-do compile }

template <typename V>
struct b
{
  template <typename T>
  class a
  {
    template <typename>
    friend class a;

    T t_;

   public:
    a() {}
    a(a<T *> const &);
  };
};

template <typename V>
template <typename T>
b<V>::a<T>::a(a<T *> const &rhs): t_(*rhs.t_)
{}


int
f ()
{
  b<void *>::a<char *> q;
  b<void *>::a<char> w(q);

  return 0;
}