|
Boost : |
From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-05-25 18:37:31
From: Greg Colvin <gcolvin_at_[hidden]>
> From: John Max Skaller <skaller_at_[hidden]>
> > Greg Colvin wrote:
> > >
> > > Larry just did me the favor of putting updated copies of my simple
> > > cyclic_ptr at:
> > >
> > > http://groups.yahoo.com/group/boost/files/smart_pointers/cyclic_ptr/
> >
> > The following must be a bug, since the definitions
> > following it are either private or public, depending on
> > the condition.
> >
> > #if !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS )
> > private:
> > template<typename> friend struct recyclable_base;
> > template<typename> friend struct cyclic_ptr;
> > template<typename> friend struct weak_ptr;
> > #endif
>
> You are right -- I've only tested this on C++ compilers.
>
> The fix is add a public: at the end of this snippet, or move
> the snippet to then end of it's class.
I spoke to soon -- it isn't a bug, it's a workaround.
For a C++ compiler the friend declarations mean that everything
following can be private. Otherwise, public access is granted
under protest.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk