P
petschy
Hello,
class A
{
protected:
class B { };
}
class C : public A, public A::B
{
};
this won't compile, gcc-3.3 and gcc-4.1 both give errors, complaining
that A::B is not visible.
However, since C inherits from A, it should access C's protected parts,
including B, right?
B is a utility class, which is intended to be used in some of A's
descendants.
I can work the above error around, I'm just curious wheter the
compilers are right or me.
Cheers, p
class A
{
protected:
class B { };
}
class C : public A, public A::B
{
};
this won't compile, gcc-3.3 and gcc-4.1 both give errors, complaining
that A::B is not visible.
However, since C inherits from A, it should access C's protected parts,
including B, right?
B is a utility class, which is intended to be used in some of A's
descendants.
I can work the above error around, I'm just curious wheter the
compilers are right or me.
Cheers, p