stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nikko...@hates.ms>
Subject Re: STDCXX-1056 [was: Re: STDCXX forks]
Date Wed, 05 Sep 2012 19:33:58 GMT
On 09/05/12 15:17, Martin Sebor wrote:
> On 09/05/2012 12:40 PM, Liviu Nicoara wrote:
>> On 09/05/12 14:09, Stefan Teleman wrote:
>>> On Wed, Sep 5, 2012 at 10:52 AM, Martin Sebor <msebor@gmail.com> wrote:
>>> [...]
>>> OK so I did a little bit of testing, after looking at the *right*
>>> __rw_guard class. :-)
>>>
>>> I changed the std::numpunct class thusly:
>>> [...]
>>
>> I am afraid this would be unsafe, too (if I said otherwise earlier I was
>> wrong). [...]  Thoughts?
>
> You're right, there's still a problem. We didn't get the double
> checked locking quite right.

I wish for simplicity: eliminate the lazy initialization, and fully initialize the facet in
the constructor. Then we'd need no locking on copying its data (std::string takes care of
its own copying).

Liviu


Mime
View raw message