summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/switch1.C
blob: a22d2b573faaa1e624b238625f51fbdd7f22f01d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do compile }
// Contributed by: Nick Savoiu <savoiu at ics dot uci dot edu>
// PR c++/14250: Incomplete type in switch statement

template <typename T> 
struct A {
  operator int();
};
 
struct C1 { 
  static A<void> t1; 
 
  void fun() 
  { 
   switch(t1) 
   { 
    default: break; 
   } 
  } 
};