sparrow 0.9.0
|
A value_ptr is a smart pointer that behaves like a value. More...
#include <memory.hpp>
Public Types | |
using | self_type = value_ptr<T> |
using | pointer = typename internal_pointer::pointer |
using | element_type = typename internal_pointer::element_type |
Public Member Functions | |
constexpr | value_ptr () noexcept=default |
constexpr | value_ptr (std::nullptr_t) noexcept |
constexpr | value_ptr (T value) |
constexpr | value_ptr (T *value) |
~value_ptr ()=default | |
constexpr | value_ptr (const value_ptr &other) |
constexpr | value_ptr (value_ptr &&other) noexcept=default |
constexpr value_ptr & | operator= (const value_ptr &other) |
constexpr value_ptr & | operator= (value_ptr &&other) noexcept=default |
constexpr value_ptr & | operator= (std::nullptr_t) noexcept |
constexpr void | reset () noexcept |
constexpr T * | get () noexcept |
constexpr const T * | get () const noexcept |
constexpr | operator bool () const noexcept |
constexpr bool | has_value () const noexcept |
constexpr T & | operator* () |
constexpr const T & | operator* () const |
constexpr T * | operator-> () |
constexpr const T * | operator-> () const |
A value_ptr is a smart pointer that behaves like a value.
It manages the lifetime of an object of type T which is not stored in the value_ptr
but a pointer, similar to unique_ptr
. When copied, it copies the managed object.
T | The type of the object managed by the value_ptr . |
Definition at line 35 of file memory.hpp.
using sparrow::value_ptr< T >::element_type = typename internal_pointer::element_type |
Definition at line 43 of file memory.hpp.
using sparrow::value_ptr< T >::pointer = typename internal_pointer::pointer |
Definition at line 42 of file memory.hpp.
using sparrow::value_ptr< T >::self_type = value_ptr<T> |
Definition at line 41 of file memory.hpp.
|
constexprdefaultnoexcept |
|
constexprnoexcept |
|
explicitconstexpr |
|
explicitconstexpr |
Definition at line 231 of file memory.hpp.
|
default |
|
constexpr |
|
constexprdefaultnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 283 of file memory.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
explicitconstexprnoexcept |
|
nodiscardconstexpr |
Definition at line 301 of file memory.hpp.
|
nodiscardconstexpr |
Definition at line 308 of file memory.hpp.
|
nodiscardconstexpr |
Definition at line 315 of file memory.hpp.
|
nodiscardconstexpr |
Definition at line 322 of file memory.hpp.
|
constexpr |
|
constexprnoexcept |
|
constexprdefaultnoexcept |
|
constexprnoexcept |
Definition at line 271 of file memory.hpp.