Skip to content

Can't derive from a decltype-specifier #11588

@llvmbot

Description

@llvmbot
Bugzilla Link 11216
Resolution FIXED
Resolved on Oct 25, 2011 10:13
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @dwblaikie,@DougGregor

Extended Description

[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()
{
}

Using:

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.

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillac++11

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions