http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59210
Bug ID: 59210
Summary: decltype incorrectly accepted as non-first element of
nested-name-specifier
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jhs at edg dot com
The grammar for nested-name-specifier only allows decltype to be the first
component of the name, so A::decltype should not be accepted.
struct A {
struct B { int i; };
B b;
};
int main() {
A a;
a.b.A::decltype(a.b)::i;
}