I
Ioannis Vranos
Why this does not compile:
class Sealed
{
friend class Fred;
Sealed() { }
};
class Fred: virtual Sealed
{};
class Fred2: public Fred {};
int main()
{
Fred2 a;
}
while this compiles?:
class Sealed
{
friend class Fred;
Sealed() { }
};
class Fred: Sealed
{};
class Fred2: public Fred {};
int main()
{
Fred2 a;
}
class Sealed
{
friend class Fred;
Sealed() { }
};
class Fred: virtual Sealed
{};
class Fred2: public Fred {};
int main()
{
Fred2 a;
}
while this compiles?:
class Sealed
{
friend class Fred;
Sealed() { }
};
class Fred: Sealed
{};
class Fred2: public Fred {};
int main()
{
Fred2 a;
}