
13 May
2011
13 May
'11
5:10 p.m.
On 5/13/2011 7:06 AM, Frank Mori Hess wrote:
It looks like you might be affected by the "static initialization order fiasco". Your test creates a global block_ptr, whose constructor seems to eventually use some class static boost::mutex. It's not clear that the constructors for the static boost::mutex will necessarily be run before the constructor of your global block_ptr.
That's a good point... but technically it is declared in the header, which is read first so it should be initialized first. -Phil