[cpp-threads] static locals

Peter Dimov pdimov at mmltd.net
Thu Jun 2 01:30:59 BST 2005


Boehm, Hans wrote:
> I think we agree.  The compiler is unlikely to perform the
> initialization
> statically, but when writing this code, it's hard for the programmer
> to preclude that possibility.  If we were to go this route, we'd
> have to add something to 3.6.2/2, (e.g. a requirement that the
> initializer
> return the same value in all legal executions), which probably
> wouldn't be a huge deal.

I don't think that such a requirement is needed, given the second bullet of 
3.6.2/2; I can't think of a case where early init would be valid under 
3.6.2/2 but invalid under the "same value in all legal executions" rule. 





More information about the cpp-threads mailing list