[LLVMbugs] [Bug 14350] New: class passing itself as a template template parameter errors in initializer list

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 14 23:32:21 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=14350

             Bug #: 14350
           Summary: class passing itself as a template template parameter
                    errors in initializer list
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: trick at icculus.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


In the following code, clang accepts the first instance of A<B>, but rejects
the second one (in the initializer list) with "template argument for template
template parameter must be a class template or type alias template":

template <template <typename> class D> struct A
{
    A () {}
};

template <typename T> struct B : A<B>
{
    B () : A<B>() {}
};

typedef also fails with the same error. g++ compiles this without issue.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list