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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.