Utilities for dealing with smart pointers.
More...
|
| Deleters |
| Smart pointer deleter functions, suitable for use with STL smart pointers.
|
|
|
template<typename T , typename U , typename Deleter > |
std::unique_ptr< T, Deleter > | sp::static_pointer_cast (std::unique_ptr< U, Deleter > &r) noexcept |
| Perform a static_cast operation on an std::unique_ptr . More...
|
|
template<typename T , typename U , typename Deleter > |
std::unique_ptr< T, Deleter > | sp::dynamic_pointer_cast (std::unique_ptr< U, Deleter > &r) noexcept |
| Like static_pointer_cast , but performs a dynamic_cast() More...
|
|
template<typename T , typename U , typename Deleter > |
std::unique_ptr< T, Deleter > | sp::const_pointer_cast (std::unique_ptr< U, Deleter > &r) noexcept |
| Like static_pointer_cast , but performs a const_cast() More...
|
|
template<typename T , typename U , typename Deleter > |
std::unique_ptr< T, Deleter > | sp::reinterpret_pointer_cast (std::unique_ptr< U, Deleter > &r) noexcept |
| Like static_pointer_cast , but performs a reinterpret_cast() More...
|
|
Utilities for dealing with smart pointers.
◆ UniquePtr
template<typename T , typename Q = T>
◆ const_pointer_cast()
template<typename T , typename U , typename Deleter >
Like static_pointer_cast
, but performs a const_cast()
◆ dynamic_pointer_cast()
template<typename T , typename U , typename Deleter >
Like static_pointer_cast
, but performs a dynamic_cast()
◆ reinterpret_pointer_cast()
template<typename T , typename U , typename Deleter >
Like static_pointer_cast
, but performs a reinterpret_cast()
◆ static_pointer_cast()
template<typename T , typename U , typename Deleter >
Perform a static_cast operation on an std::unique_ptr
.
Returns a new unique_ptr
which owns the buffer originally owned by r
, but cast to the new type. This operation destroys r
. Future calls to r.get()
will return nullptr
.