OSDN Git Service

PR c++/48261
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / sizeof-template-argument.C
1 /* This used to ICE (PR c++/29573) */
2 /* { dg-do compile } */
3
4 template<int> struct A {};
5
6 template<typename> struct B : A <sizeof(=)> {}; /* { dg-error "parse error in template argument list" } */
7
8 template<typename> struct C : A <sizeof(=)> {}; /* { dg-error "parse error in template argument list" } */
9
10 int a;
11
12 template<typename> struct D : A <sizeof(a=1)> {}; /* This used to ICE as well. */
13
14 template<typename> struct E : A <sizeof(a=1)> {}; /* This used to ICE as well. */
15