|
Boost : |
Subject: Re: [boost] [any] new version
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-09-05 12:35:28
AMDG
On 09/05/2011 04:18 AM, Mathias Gaunard wrote:
> On 02/09/2011 20:58, Martin Bidlingmaier wrote:
>> - 2. thread safety
>> In c++03, variables defined at namespace scope are not necessarily
>> initialized before main()
>
> Yes they are.
>
No they aren't. From 3.6.2:
"It is implementation-defined whether or not the
dynamic initialization (8.5, 9.4, 12.1, 12.6.2)
of an object of namespace scope is done before
the first statement of main. If the initialization
is deferred to some point in time after the first
statement of main, it shall occur before the first
use of any function or object defined in the same
translation unit as the object to be initialized."
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk