Boost logo

Boost :

From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2007-02-05 16:40:29


Steven Watanabe wrote:
>> When multiple threads are present, there's no race condition when
>> more than one of them call GetPodInstance(). Clearly there is one
>> when they call GetNonPodInstance() because NonPod::NonPod() will non
>> run before the first call...
>>
>
> GetPodInstance() is probably safe, but the standard does
> not require it. "A local object of POD type (3.9) with static
> storage duration initialized with constant-expressions is
> initialized before its block is first entered." (6.7/4)

Interesting, from the wording above I would have concluded that the
standard *does* require it.

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header. 

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