[LLVMbugs] [Bug 7259] New: Derivative class with parent class as template parameter cannot inherit constructor from any class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 30 03:17:28 PDT 2010


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

           Summary: Derivative class with parent class as template
                    parameter cannot inherit constructor from any class
           Product: clang
           Version: 2.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: christian.bugs.2010.05 at juner.de
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=4948)
 --> (http://llvm.org/bugs/attachment.cgi?id=4948)
The source code that fails to compile

The file compiles fine with g++ (4.4.3) but does not with clang. I don't know
what the C++ standard demands, but given clang tries to be compatible with g++
I think this is an appropriate bug.

$ clang clangtest.cpp 
clangtest.cpp:9:14: error: type 'class Base' is not a direct or virtual base of
'Derived'
        Derived() : Base() {}
                    ^~~~
1 diagnostic generated.

$ clang --version
clang version 1.1 (branches/release_27)
Target: x86_64-pc-linux-gnu
Thread model: posix

The same still happens with clang trunk.
$ clang --version
clang version 2.0 ($URL$ 1)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
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