Take a look at the following code:
struct A {
static int i;
};
int A::i = 0;
struct B : A {
typedef A T;
static int i;
};
int B::i = 1;
struct C {
typedef int T;
};
void f(B* bp)
{
bp->T::i = 1; // legal?
T::i = 1; // definitely illegal?
}
Is the bp->T::i legal? I assume the bp tells the compiler to find
B::T::i. Can someone tell me what section of the WP this is covered in?
Thanks.