1 // Core 1715 2 // { dg-do compile { target c++11 } } 3 // { dg-options -fnew-inheriting-ctors } 4 5 template<class T> struct S { 6 private: 7 typedef int X; 8 friend struct B; 9 }; 10 11 struct B { 12 template<class T> B(T, typename T::X); 13 }; 14 15 struct D: B { 16 using B::B; 17 }; 18 19 S<int> s; 20 B b(s, 2); // Okay, thanks to friendship. 21 D d(s, 2); // Now OK as well. 22