1 // { dg-do compile { target c++11 } }
3 //This instatiation is ok
4 template<typename T> struct S1
9 template struct S1<int>; //ok
11 //This error is diagnosed at instantiation time
12 template<typename T> struct S2
14 enum E : int; // { dg-error "previous definition" }
15 enum E : T; // { dg-error "different underlying type" }
17 template struct S2<short>; // { dg-message "required from here" }
19 //This error is diagnosed at compilation time
20 template<typename T> struct S3
22 enum E : int; // { dg-error "previous definition" }
23 enum E : short; // { dg-error "different underlying type" }