c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / template / crash104.C
blob097c46982cb73861e4cd68a92a09ce9441002dca
1 // PR c++/46046
3 template <class T>
4     struct foo
6     template <class U, class V = void>
7         struct type
8     {};
10     template <class V>
11         struct type<
12             typename T::template some_type<int>,
13             V
14         >
15     {};
18 template <class T>
19     class bar
20 {};
22 int main()
24   typedef foo<bar<int> > cont;
25   cont::type<char> obj; // { dg-error "cannot be defined" }