Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-07-24 10:27:50


From: "Damien Fisher" <damien_at_[hidden]>
> On Wed, 24 Jul 2002, Peter Dimov wrote:
>
> > From: "Damien Fisher" <damien_at_[hidden]>
> > > In my local copy of boost (1.28), I just noticed that in
> > > intrusive_ptr.hpp there are 2 #ifdefs which I believe should be
> > > #ifndefs:
> > >
> > > #ifdef BOOST_MSVC6_MEMBER_TEMPLATES
> > >
> > > template<class U> intrusive_ptr(intrusive_ptr<U> const & rhs):
> > p_(rhs.get())
> > > {
> > > if(p_ != 0) intrusive_ptr_add_ref(p_);
> > > }
> > >
> > > #endif
> >
> > Looks OK to me. MSVC6_... is a "positive" macro; it's defined when the
> > compiler supports at least the MSVC6-compatible member template subset.
> >
> > The "negative" macro is BOOST_NO_MEMBER_TEMPLATES, but it's defined for
MSVC
> > 6.
>
> Ok, that's weird...I am compiling using gcc 2.95.3-5 (cygwin) with STLPort
> 4.5.3 and I wasn't getting the above constructor unless I changed from
> #ifdef to #ifndef. Is this a configuration issue?

Probably. boost/config/suffix.hpp(90) does:

//
// if member templates are supported then so is the
// VC6 subset of member templates:
//
# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
       && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
# define BOOST_MSVC6_MEMBER_TEMPLATES
# endif

so either you are using a custom/empty config, or BOOST_NO_MEMBER_TEMPLATES
has been set.


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