
16 Dec
2009
16 Dec
'09
9:55 p.m.
Hi all, The C++ standards document states that it is implementation dependent whether the constructor of a static object is called before entering main() or just before first use (ISO/IEC 14882:2003 section 3.6.2 part 3). I can't help wondering why the standard leaves this choice open to implementation. The compilers/linkers/platforms I tested my library with all enable calling the constructors before entering main() by default, but this behavior is not guaranteed by the language. I currently don't know whether this behavior can be guaranteed in any way. If so, the library may still be useful, but perhaps not for Boost. Kind regards, Dave van Soest