std::experimental::shared_ptr (3) - Linux Manuals
std::experimental::shared_ptr: std::experimental::shared_ptr
NAME
std::experimental::shared_ptr - std::experimental::shared_ptr
Synopsis
Defined in header <experimental/memory>
template< class T > class shared_ptr; (library fundamentals TS)
std::experimental::shared_ptr is a modified version of std::shared_ptr that adds support for arrays.
Member types
Member type Definition
element_type std::remove_extent_t<T>
Member functions
constructor (public member function)
Observers
get (public member function)
operator* (public member function)
operator->
operator[] (public member function)
Non-member functions
static_pointer_cast applies static_cast, dynamic_cast, const_cast, or reinterpret_cast to the stored pointer
dynamic_pointer_cast (function template)
const_pointer_cast
reinterpret_pointer_cast
Helper classes
std::hash<std::experimental::shared_ptr> (class template specialization)
Members and non-members identical to std::shared_ptr
Member functions
The following member functions work with std::experimental::shared_ptr instead of std::shared_ptr and std::experimental::weak_ptr instead of std::weak_ptr. The behavior is otherwise identical.
destructor (public member function of std::shared_ptr<T>)
operator= (public member function of std::shared_ptr<T>)
Modifiers
reset (public member function of std::shared_ptr<T>)
swap (public member function of std::shared_ptr<T>)
Observers
use_count (public member function of std::shared_ptr<T>)
unique checks whether the managed object is managed only by the current shared_ptr instance
(until C++20)
operator_bool (public member function of std::shared_ptr<T>)
owner_before (public member function of std::shared_ptr<T>)
Non-member functions
These non-member functions are declared in the std::experimental namespace, and work with std::experimental::shared_ptr rather than std::shared_ptr, but otherwise behaves identically to the corresponding C++14 function.
make_shared
make_shared_default_init creates a shared pointer that manages a new object
(C++20)
allocate_shared
allocate_shared_default_init creates a shared pointer that manages a new object allocated using an allocator