Pointer wrapper that takes handle both shared as well as regular (unmanaged) pointers.
More...
#include <pointer.h>
Inherits shared_ptr< std::remove_reference_t< T > >.
|
| constexpr | pointer (ptr_t ptr=nullptr, bool managed=false) noexcept |
| | Init from a regular pointer.
|
| |
| constexpr bool | is_managed (void) const |
| | Returns true if the pointer manages the object deallocation.
|
| |
|
| template<typename Y > |
| constexpr | pointer (const std::shared_ptr< Y > &ptr) noexcept |
| |
| template<typename Y > |
| constexpr | pointer (std::shared_ptr< Y > &&ptr) noexcept |
| |
|
| using | ptr_t = std::add_pointer_t< std::remove_all_extents_t< T > > |
| |
| using | base_type = std::shared_ptr< std::remove_reference_t< T > > |
| |
template<typename T>
class bbm::pointer< T >
Pointer wrapper that takes handle both shared as well as regular (unmanaged) pointers.
This is a wrapper around shared_ptr that replaced the deleter with an empty deleter if the object should not be managed by the pointer.
◆ base_type
| using base_type = std::shared_ptr<std::remove_reference_t<T> > |
|
private |
◆ ptr_t
| using ptr_t = std::add_pointer_t<std::remove_all_extents_t<T> > |
|
private |
◆ pointer() [1/3]
| constexpr pointer |
( |
ptr_t |
ptr = nullptr, |
|
|
bool |
managed = false |
|
) |
| |
|
inlineconstexprnoexcept |
Init from a regular pointer.
◆ pointer() [2/3]
| constexpr pointer |
( |
const std::shared_ptr< Y > & |
ptr | ) |
|
|
inlineconstexprnoexcept |
◆ pointer() [3/3]
| constexpr pointer |
( |
std::shared_ptr< Y > && |
ptr | ) |
|
|
inlineconstexprnoexcept |
◆ is_managed()
| constexpr bool is_managed |
( |
void |
| ) |
const |
|
inlineconstexpr |
Returns true if the pointer manages the object deallocation.
◆ empty_delete
| constexpr auto empty_delete = [](ptr_t){} |
|
staticconstexprprivate |
The documentation for this class was generated from the following file: