This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49155] New: [C++0x] decltype-specifier not supported as base type specifier
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 May 2011 07:30:13 +0000
- Subject: [Bug c++/49155] New: [C++0x] decltype-specifier not supported as base type specifier
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49155
Summary: [C++0x] decltype-specifier not supported as base type
specifier
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: daniel.kruegler@googlemail.com
CC: jason@redhat.com
gcc 4.7.0 20110521 (experimental) in C++0x mode rejects the following code:
//---
struct A{};
A foo();
struct B : decltype(foo()) {}; // #
//---
"error: expected class-name before 'decltype'
error: expected '{' before 'decltype'
error: expected unqualified-id before '{' token"
This code should be accepted, a decltype-specifier is now valid in
base-specifier-list as of FDIS, Clause 10.