Subject: Re: [boost] Fw: [atomic] review results
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-11-08 14:37:48
Andrey Semashev wrote:
> Reference counting? A library might return a smart pointer to a structure
> a reference counter. Linking reference counting methods or making them
> 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.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk