Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2005-03-11 19:38:09

"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.
> I guess it does that with the Andrei's longevity technique? That would be
> contrary to the scalability requirements, because you manually have to
> give the parts unique ids.
Either this or other technique available in Singleton.

If the IDs could be generated and assigned dynamically
then this could be done during statics initialization time too.


Boost list run by bdawes at, gregod at, cpdaniel at, john at