Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-01-18 15:00:09


Gennadiy Rozental:

> Peter Dimov <pdimov <at> pdimov.com> writes:
>> X* X::instance()
>> {
>> static X* s_px = 0;
>>
>> if( X* px = atomic_load_relaxed( &s_px ) )
>
> &s_px doesn't look right here.

I'm using a C-style atomic interface for illustration purposes:

T atomic_load_relaxed( T * pt ); // returns *pt, but atomically


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