Giles wrote: For the C++ standards guys to implement this, it would need to be more aware of the system and threading architecture. I don't think so actually. All you need is a conditional. Shouldn't be that tricky, should it? Also, the standards guys only have to specify the behaviour, it's up to the compiler/runtime guys to implemented. And furthermore, they could make this a compiler option just like exceptions and RTTI. Giles wrote: How would you implement it? I've just had a thought that you would have to implement an extra byte/flag on the V-Table and make use of an OS specific sync model to make sure that you could identify when to call the static constructor. You wouldn't want it in the vtable, since there is nothing virtual about this - it's per class instance, not object instance. So you could shove a bit into a possibly already existing bit vector into the class information block. CLASS_OPT_STATIC_CONSTRUCTOR_ON_THIS_BRANCH = 1 -> Start executing static initializers from top to bottom. Of course, the entire inheritance chain from root to this-class needs to be locked, but that's obvious if you think/draw pictures about it. Giles wrote: but to integrate in to the language in a cross platform way is more tricky. e.g. a real time OS. I don't see the problem actually. There are threaded and non-threaded environments. The non-threaded environments we don't need to consider - the fact that they are non-threaded makes the implementation easy as pie. Threaded environments need only support one thing: conditionals. If they don't, then something's terribly f-ed up in that environment. It's like having files and file systems, but in no way provide a way to open/create files. Cross platform differences are solved in runtime libraries. It's done that way today, and it works just fine.. doesn't it? :~ If I wasn't so damn lazy I think I could pull this one off using GCC. (If it hasn't already been done that is). -- "It is amazing how f-ing crazy I really am."