|
Boost : |
From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2003-08-05 16:48:28
David Abrahams <dave_at_[hidden]> wrote in message
news:uptjk9di6.fsf_at_boost-consulting.com...
> Alisdair Meredith <alisdair.meredith_at_[hidden]> writes:
>
> > The fix I am currently using looks like this in shared_ptr [line 284]
> >
> > void swap(shared_ptr<T> & other) // never throws
> > {
> > #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x0564) )
> > _STL::swap(px, other.px);
> > #else
> > std::swap(px, other.px);
> > #endif
> > pn.swap(other.pn);
> > }
> >
> > I am not submitting this as a diff yet as I am not sure this is the
> > 'correct' patch yet, but I hope it gives the idea. A similar patch
> > needs to be applied everywhere in Boost std::swap is called, which could
> > be quite a bit of work. I am happy to go through all the libraries and
> > submit appropriate diffs, but first I would like agreement a patch is
> > appropriate, and the correct form.
>
> I'm trying to say that I think it's the wrong patch. The right patch
> would put the swap specialization into _STL::.
>
It actually sufixes to put any 'std' extension in a nested namespace (say, stdx); then injecting
the names in 'std'.
Fernando Cacciola
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk