aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/sizeof-template-argument.C
blob: 31aeeec9bfcc827c2e8ecfadb6bdd074ce7f1fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* This used to ICE (PR c++/29573) */
/* { dg-do compile } */

template<int> struct A {};

template<typename> struct B : A <sizeof(=)> {}; /* { dg-error "template argument" } */

template<typename> struct C : A <sizeof(=)> {}; /* { dg-error "template argument" } */

int a;

template<typename> struct D : A <sizeof(a=1)> {}; /* This used to ICE as well. */

template<typename> struct E : A <sizeof(a=1)> {}; /* This used to ICE as well. */