
"Chris Newbold" <Chris.Newbold@mathworks.com> wrote in message news:6F6A2FC198A0F943ACC2259C38A2E30B6688EDD1B4@EXCHANGE-AH.ad.mathworks.com... [...]
Just for grins, try printing a message out from the destructor of owned_base::pool (or setting a breakpoint there) and see how many times you wind up there. My hunch is that this is an ODR issue...
I get the following: ... virtual boost::detail::sh::owned_base::~owned_base(): 1997 virtual boost::detail::sh::owned_base::~owned_base(): 1998 virtual boost::detail::sh::owned_base::~owned_base(): 1999 0 1 1 virtual boost::detail::sh::owned_base::~owned_base(): 2000 1 test = 5 virtual boost::detail::sh::owned_base::~owned_base(): 2001 0 0 Segmentation fault BTW I have gotten the same problem by using Gcc 4.3 and I am not linking multiple source files. Here is my build process: $ g++ shifted_ptr_test2.cpp -I ../../.. Regards, -Phil