User Tools

Site Tools


software:pointers
Type Defined where? Header in C++98 containers?
​std::auto_ptr C++98 (deprecated) <memory> no (not copyable)
std::unique_ptr C++11 <memory> no (C++11)
std::shared_ptr C++11 <memory> no (C++11)
​std::weak_ptr C++11 <memory> no (C++11)
​boost::scoped_ptr Boost <boost/scoped_ptr.hpp> no (not copyable)
boost::shared_ptr Boost <boost/shared_ptr.hpp> yes
boost::weak_ptr Boost <boost/weak_ptr.hpp> yes
boost::intrusive_ptr Boost <boost/intrusive_ptr.hpp> (?)

Note the existence of ​ boost::scoped_array and ​ boost::shared_array if the pointer is created with new [] and released with delete [].

software/pointers.txt · Last modified: 2020/12/28 13:47 by solar