Boost logo

Boost :

Subject: Re: [boost] Fw: [atomic] review results
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2011-11-08 15:18:57


On Tuesday, November 08, 2011 21:37:48 Peter Dimov wrote:
> Andrey Semashev wrote:
> > Reference counting? A library might return a smart pointer to a
> > structure
> > with
> > a reference counter. Linking reference counting methods or making them
> > virtual
> > may be undesirable to allow inlining.
>
> Yep. This is what I meant by "bad". Yes, shared_ptr does it, but it's still
> a bad idea. There is no reason to inline code that operates on atomics into
> several separate modules - it just creates the possibility of subtle ODR
> violations when the inlined code gets out of sync.

Surely there may be caveats, as well as in just about every design. But
according to my practice one almost always compiles the application against a
fixed version of Boost. It is the other cases I would call contrived and bad.


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