
30 Apr
2012
30 Apr
'12
5:14 p.m.
On Mon, Apr 30, 2012 at 10:54 AM, Phillip Hellewell
I'm upgrading to boost 1.49 and getting this fatal error while compiling a source file that uses shared_ptr:
1>C:\mycomps\base\target\dependency\include\boost/smart_ptr/shared_ptr.hpp(362): fatal error C1001: An internal error has occurred in the compiler.
Good news. Luckily I was able to pinpoint the exact line of code causing VS to crash, and two different workarounds: Crashes VS: return Foo_ptr(new Foo()); Workaround 1: return boost::shared_ptr<Foo>(new Foo()); Workaround 2: Foo_ptr ret(new Foo()); return ret; (Foo_ptr is a typedef of boost::shared_ptr<Foo>) Phillip