~>g++-svn-4.3 troep.cc troep.cc: In instantiation of âcheck<int, Saveable>â: troep.cc:38: instantiated from here troep.cc:14: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
All 3.x (that I have installed) and all 4.x versions ice on this. Content of troep.cc: typedef char no; typedef char (&yes)[2]; template <typename T, template <typename> class Concept> struct check { template <int H> struct hint; template <typename U> static no test(...); template <template <typename> class C, typename X, C<X>* = 0> struct helper { typedef yes type; }; template <typename U> static typename helper<Concept, U>::type test(U* t); static bool const value = (sizeof(check::template test<T>(0)) == sizeof(yes)); }; template <typename C, typename T, T C::* P> struct member { typedef T type; }; template <typename T> struct Saveable : member<T, void(), &T::save> { }; int main() { check<int, Saveable>::value; } -- Summary: Internal compiler error Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: carlo at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405