February 28th, 2013, 8:59 am
The one from boost is the predecessor of the one from std. You can use either of them and their behaviour and performance should be comparable.In my case, I think I will be moving towards std::shared_ptr in the long term, but since we have a lots of libraries that are compiled under different architectures and with different versions of the compiler it will take many years (if ever) to replace boost::shared_ptr,Main advantage of boost::shared_ptr<> is that it will compile with older compilers. If you are starting a new application from scratch and you don't have legacy issues then I would suggest to use std::shared_ptr instead of boost::shared_ptr, otherwise the one from boost may be the only available.Either way it won't make much difference.