Fixing vc++ compatibility with shared_ptr