W
werasm
Hi All,
I have this minimal bit of code that I found compiles under Comeau and
EDG++, but not under mingw and VC++8.
class Xc;
class Xx
{
friend class Xc;
static void doIt();
};
class Xc{ struct Impl; };
struct Xc::Impl
{
Impl(){ Xx::doIt(); }
};
Should granting friendship to a class not grant friendship to its
nested classes too? I realise friendship is not inheritable, but
it is really constraining to prohibit nested types (which
effectively is part of that class - stronger relationship than
inheritance).
Is this a bug on the part of VCC and MingW or not?
Kind regards,
Werner
I have this minimal bit of code that I found compiles under Comeau and
EDG++, but not under mingw and VC++8.
class Xc;
class Xx
{
friend class Xc;
static void doIt();
};
class Xc{ struct Impl; };
struct Xc::Impl
{
Impl(){ Xx::doIt(); }
};
Should granting friendship to a class not grant friendship to its
nested classes too? I realise friendship is not inheritable, but
it is really constraining to prohibit nested types (which
effectively is part of that class - stronger relationship than
inheritance).
Is this a bug on the part of VCC and MingW or not?
Kind regards,
Werner