[LC++]A static const class member and the class constructor.

Carlo Wood carlo at alinoe.com
Tue Dec 18 12:09:10 UTC 2001


On Tue, Dec 18, 2001 at 02:56:25AM +0200, Shaul Karl wrote:
> Running the above program under gdb shows that the Segmentation fault 
> is due to the fact that the static const string member is still not 
> initialized when the constructor is being called. At least this is how 

That is called the 'The static initialization order fiasco',
see the C++ FAQ.

-- 
Carlo Wood <carlo at alinoe.com>



More information about the tuxCPProgramming mailing list