
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 12 May 2010, Rob Yull wrote:
I recently upgrade from boost 1.42 to 1.43. All of a sudden, the project I was working on seems to be throwing an exception before main() is called. I was able to reproduce this error in the example below. Using 1.42, it executes just fine. Using 1.43, an exception is thrown before main is reached.
I would guess you are trying to lock the static mutex before its constructor has run. I believe the only guarantee C++ provides wrt static initialization order is that POD types will be initialized before non-POD types. This link might be helpful: http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkvqxysACgkQ5vihyNWuA4WNFACgyGsUNhd4no488HdfTyQ82AVE +bwAn14bax0UTbNMd7KhwO75FIG9mMpn =g847 -----END PGP SIGNATURE-----