Boost logo

Boost :

Subject: Re: [boost] [any] new version
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-09-05 07:20:05


On 05/09/2011 13:18, Mathias Gaunard wrote:

>> , so there could be data races for the
>> previous_id in next_id() in multi threaded applications.
>
> That's not namespace scope, that's function scope.
>
> The C++11 standard (the only one aware of multithreading) mandates that
> initialization of static variables at function scope is thread-safe.

Sorry, that is irrelevant here, you'd need the full body of the function
to be thread-safe if you need thread-safety even in code that happens
before main.


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