http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53618

             Bug #: 53618
           Summary: segfault on self-referential class partial
                    specialization argument
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: pot...@mac.com


I was trying a new approach to SFINAE on 4.7.0 and ICEd instead. Not sure if
this is valid. The idea is to check whether the specialization is already a
complete class while forming the partial specialization arguments.
(http://stackoverflow.com/questions/10958435)

---

template< int > struct ic;

template< typename t, typename c = ic< 0 > >
struct is_dereferenceable;

template< typename t >
struct is_dereferenceable< t, ic< true? 0 : * t() > > {};

template< typename t >
struct is_dereferenceable< t, ic< sizeof (is_dereferenceable< t >) > > {};

is_dereferenceable< char * > i;

Reply via email to