Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-11-23 10:57:17

According to g++ and comeau, the following is illegal: (The commented line
allows the code to compile.)

class A {
      A () {}
      ~A () {}

      class Nested;
   //friend class B;

class B {
      B () {}
      ~B () {}

      friend class A::Nested;

Here's why:
"7 A name nominated by a friend declaration shall be accessible in the scope
of the class containing the friend declaration."

It is ridiculous that I can't give access to an inaccessible class. You have
to have access to be able to give it? What is the justification for this?

Boost list run by bdawes at, gregod at, cpdaniel at, john at