Boost logo

Boost :

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
> 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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at