[Bug c++/53618] New: segfault on self-referential class partial specialization argument

potswa at mac dot com gcc-bugzilla@gcc.gnu.org
Sat Jun 9 04:47:00 GMT 2012


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: unassigned@gcc.gnu.org
        ReportedBy: potswa@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;



More information about the Gcc-bugs mailing list