[cpp-threads] static locals (was: Memory model counterproposal...)

Peter Dimov pdimov at mmltd.net
Fri May 27 21:34:17 BST 2005


Andrei Alexandrescu wrote:
> Alexander Terekhov wrote:
>> static(synchronized) X * p = new X;
>
> So 'synchronized' would be a contextual keyword. C++ doesn't have any
> (although I personally like them), and as such we might encounter
> resistance.
>
> Maybe the uglier
>
> static "once" vardecl
>
> might have more success.

What's wrong with Hans's original suggestion of protected static? It doesn't 
require a new keyword or contextual syntax. 





More information about the cpp-threads mailing list