Boost logo

Boost :

Subject: [boost] [config] A question about BOOST_NO_NESTED_FRIENDSHIP
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-03-26 14:06:11


Hi,

I've been merging my recent additions to the release branch and came
across the BOOST_NO_NESTED_FRIENDSHIP macro, which hasn't been merged.
Looking at its description and test, I'm not certain whether this macro
actually flags a compiler deficiency, rather than valid behavior. Here's
the description:

   If the compiler fails to support access to private members
   from nested classes

And the test:

   class A {
      static int b;
      class B {
         int f() { return b; }
      };
   };

To my understanding, 11.8 says that it shouldn't compile, as B doesn't
have any privileged access to A::b. Am I missing something?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk