From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2005-03-09 17:10:44
"Andreas Huber" wrote:
> 2. At runtime. Each TU could have one static variable of a type with a
> constructor. Inside the ctor you register your part of the FSM with the
> FSM object. This sounds like it could work. Problem is that the standard
> does not give many guarantees when exactly these static objects are
> constructed. You can *hope* that they are constructed before the FSM
> object and on some platforms they actually are constructed at program
> startup but there's no guarantee for that.
Just note: Singleton library (the one written by Jason Hise)
allows guaranteed construction order for objects in multiple TUs.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk