1 // { dg-do compile { target c++11 } } 2 // { dg-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0 " } 3 // PR C++/30033 4 // Make sure that the static assert does not crash the GC. 5 6 template <class T> 7 struct default_delete 8 { 9 void operatordefault_delete10 operator() (T * ptr) const 11 { 12 static_assert (sizeof (T) > 0, "Can't delete pointer to incomplete type"); 13 } 14 }; 15 16 17