[LLVMbugs] [Bug 11216] New: Can't derive from a decltype-specifier

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Oct 23 16:02:35 PDT 2011


           Summary: Can't derive from a decltype-specifier
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hhinnant at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

[class.derived]/p1 says that a "base-type-specifier" can be a
"class-or-decltype".  Here's an example code exercising the case for decltype:

struct A

A make_A();

struct B
    : decltype(make_A())

int main()


Apple clang version 3.0 (tags/Apple/clang-215.4) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix

I get:

test.cpp:10:7: error: expected class name
    : decltype(make_A())
1 error generated.

Expect: clean compile.

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