简体   繁体   中英

Differences between VS2010's std::shared_ptr and boost::shared_ptr

What are the differences between VS2010's std::shared_ptr and boost::shared_ptr ?

Are the implementations almost the same? Or are there significant differences?

What is the most efficient/optimized?

Thanks.

VS2010's shared_ptr is implementation conforming (or, at least, trying to conform) C++11 standard.

boost::shared_ptr on the other hand, was developed way earlier, and as part of boost rather than C++ standard library. I believe both are efficient enough for production use, but using boost forces you to... use boost ;). Which in some cases is quite unacceptable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM