aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/inh-ctor35a.C
blob: 47f69de41b8073833e3a00a45a2acb9dab97de63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Core 1715
// { dg-do compile { target c++11 } }
// { dg-options -fnew-inheriting-ctors }

template<class T> struct S {
private:
  typedef int X;
  friend struct B;
};

struct B {
  template<class T> B(T, typename T::X);
};

struct D: B {
  using B::B;
};

S<int> s;
B b(s, 2); // Okay, thanks to friendship.
D d(s, 2); // Now OK as well.