Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/crash104.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/46046 |
2 | |
3 template <class T> | |
4 struct foo | |
5 { | |
6 template <class U, class V = void> | |
7 struct type | |
8 {}; | |
9 | |
10 template <class V> | |
11 struct type< | |
12 typename T::template some_type<int>, | |
13 V | |
14 > | |
15 {}; | |
16 }; | |
17 | |
18 template <class T> | |
19 class bar | |
20 {}; | |
21 | |
22 int main() | |
23 { | |
24 typedef foo<bar<int> > cont; | |
25 cont::type<char> obj; // { dg-error "cannot be defined" } | |
26 } |