文章浏览阅读324次。概述shared_ptr的基本使用可以参考之前文章: C++11 shared_ptr weak_ptr。别名构造函数// cppreferencetemplate< class T > class shared_ptr;(since C++11)// 别名构造函数template< class Y >shared_ptr( const shared_ptr<Y>& r, elemen......
文章浏览阅读139次。语法// <memory>// template< class T > class shared_ptr; (since C++11)template< class Y >bool owner_before( const shared_ptr<Y>& other) const noexcept;template< class Y >bool owner_before( const std::weak_ptr<Y>&a_c++ owner_befo......