On 03/25/2014 03:48 PM, Adam Butcher wrote:
I don't follow. Are you suggesting a case like the following?
struct A
{
struct X
{
struct B
{
void foo(auto);
};
};
void X::B::foo(auto) {} // { dg-error "cannot define" }
};
I meant
struct A
{
struct X
{
struct B
{
void foo(auto);
};
void B::foo(auto) {} // { dg-error "cannot define" }
};
};
Here we push both A and X for the declarator. When we get to the pushed
X, we see that the enclosing scope is A, so we break out of the loop and
don't pop either of the pushed scopes.
Jason