I'm not sure if the following should compile or not, but it certainly should
ICE the compiler. Latest gcc from SVN with vararg template patches from Doug
Gregor. Build with -std=c++0x.

Doug, no rush on this one. Just logging it for posterity.

template<typename ... Args>
struct foo
{
    static bool const value = true;
};

template<typename ... Args>
struct foo< typename Args::is_applied... >
{
    static bool const value = false;
};

struct not_applied { typedef void is_applied; };
struct applied { typedef applied is_applied; };

int main()
{
    foo<applied, applied> i;
}


-- 
           Summary: internal compiler error: in dependent_type_p, at
                    cp/pt.c:15319 (vararg templates)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eric dot niebler at gmail dot com


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

Reply via email to