c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr66690.C
blob3e32aa36fa7a2edb769c8f6e2ac8ab2311c48c9f
1 // PR c++/66690
2 // { dg-do compile { target c++14 } }
4 template<class T> auto foo(T t) {return 3;}
5 class B {B();};  // { dg-message "declared private" }
6 template<class T> class D:public B
8     D()  // { dg-message "declared private" }
9     {  // { dg-error "is private" }
10         T x00;
11         foo(x00);
12     }
14 D<int> d;  // { dg-error "is private" }