|
| constexpr | cycle_gptr () noexcept |
| | Default constructor. More...
|
| |
| constexpr | cycle_gptr ([[maybe_unused]] std::nullptr_t nil) noexcept |
| | Nullptr constructor. More...
|
| |
| | cycle_gptr (const cycle_gptr &other) noexcept |
| | Copy constructor. More...
|
| |
| | cycle_gptr (cycle_gptr &&other) noexcept |
| | Move constructor. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| | cycle_gptr (const cycle_gptr< U > &other) noexcept |
| | Copy constructor. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| | cycle_gptr (cycle_gptr< U > &&other) noexcept |
| | Move constructor. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| | cycle_gptr (const cycle_member_ptr< U > &other) |
| | Copy constructor. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| | cycle_gptr (cycle_member_ptr< U > &&other) |
| | Move constructor. More...
|
| |
| template<typename U > |
| | cycle_gptr (const cycle_gptr< U > &other, element_type *target) noexcept |
| | Aliasing constructor. More...
|
| |
| template<typename U > |
| | cycle_gptr (const cycle_member_ptr< U > &other, element_type *target) |
| | Aliasing constructor. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| | cycle_gptr (const cycle_weak_ptr< U > &other) |
| | Construct from cycle_weak_ptr. More...
|
| |
| auto | operator= (const cycle_gptr &other) noexcept -> cycle_gptr & |
| | Copy assignment. More...
|
| |
| auto | operator= (cycle_gptr &&other) noexcept -> cycle_gptr & |
| | Move assignment. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| auto | operator= (const cycle_gptr< U > &other) noexcept -> cycle_gptr & |
| | Copy assignment. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| auto | operator= (cycle_gptr< U > &&other) noexcept -> cycle_gptr & |
| | Move assignment. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| auto | operator= (const cycle_member_ptr< U > &other) -> cycle_gptr & |
| | Copy assignment. More...
|
| |
| template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> |
| auto | operator= (cycle_member_ptr< U > &&other) -> cycle_gptr & |
| | Move assignment. More...
|
| |
| auto | reset () noexcept -> void |
| | Clear this pointer. More...
|
| |
| auto | swap (cycle_gptr &other) noexcept -> void |
| | Swap with other. More...
|
| |
| auto | swap (cycle_member_ptr< T > &other) -> void |
| | Swap with other. More...
|
| |
|
auto | get () const noexcept -> T * |
| | Retrieve address of this pointer.
|
| |
| template<bool Enable = !std::is_void_v<T>> |
| auto | operator * () const -> std::enable_if_t< Enable, T > & |
| | Dereference operation. More...
|
| |
| template<bool Enable = !std::is_void_v<T>> |
| auto | operator-> () const -> std::enable_if_t< Enable, T > * |
| | Indirection operation. More...
|
| |
| | operator bool () const noexcept |
| | Test if this holds a non-nullptr. More...
|
| |
| template<typename U > |
| auto | owner_before (const cycle_weak_ptr< U > &other) const noexcept -> bool |
| | Ownership ordering. More...
|
| |
| template<typename U > |
| auto | owner_before (const cycle_gptr< U > &other) const noexcept -> bool |
| | Ownership ordering. More...
|
| |
| template<typename U > |
| auto | owner_before (const cycle_member_ptr< U > &other) const noexcept -> bool |
| | Ownership ordering. More...
|
| |
|
(Note that these are not member functions.)
|
|
template<typename T > |
| auto | swap (cycle_member_ptr< T > &x, cycle_gptr< T > &y) noexcept -> void |
| | Swap two pointers.
|
| |
| template<typename T , typename U > |
| auto | operator== (const cycle_gptr< T > &x, const cycle_gptr< U > &y) noexcept -> bool |
| | Equality comparison. More...
|
| |
| template<typename T > |
| auto | operator== (const cycle_gptr< T > &x, [[maybe_unused]] std::nullptr_t y) noexcept -> bool |
| | Equality comparison. More...
|
| |
| template<typename U > |
| auto | operator== ([[maybe_unused]] std::nullptr_t x, const cycle_gptr< U > &y) noexcept -> bool |
| | Equality comparison. More...
|
| |
| template<typename T , typename U > |
| auto | operator!= (const cycle_gptr< T > &x, const cycle_gptr< U > &y) noexcept -> bool |
| | Inequality comparison. More...
|
| |
| template<typename T > |
| auto | operator!= (const cycle_gptr< T > &x, [[maybe_unused]] std::nullptr_t y) noexcept -> bool |
| | Inequality comparison. More...
|
| |
| template<typename U > |
| auto | operator!= ([[maybe_unused]] std::nullptr_t x, const cycle_gptr< U > &y) noexcept -> bool |
| | Inequality comparison. More...
|
| |
| template<typename T , typename U > |
| auto | operator< (const cycle_gptr< T > &x, const cycle_gptr< U > &y) noexcept -> bool |
| | Less comparison. More...
|
| |
| template<typename T > |
| auto | operator< (const cycle_gptr< T > &x, [[maybe_unused]] std::nullptr_t y) noexcept -> bool |
| | Less comparison. More...
|
| |
| template<typename U > |
| auto | operator< ([[maybe_unused]] std::nullptr_t x, const cycle_gptr< U > &y) noexcept -> bool |
| | Less comparison. More...
|
| |
| template<typename T , typename U > |
| auto | operator> (const cycle_gptr< T > &x, const cycle_gptr< U > &y) noexcept -> bool |
| | Greater comparison. More...
|
| |
| template<typename T > |
| auto | operator> (const cycle_gptr< T > &x, [[maybe_unused]] std::nullptr_t y) noexcept -> bool |
| | Greater comparison. More...
|
| |
| template<typename U > |
| auto | operator> ([[maybe_unused]] std::nullptr_t x, const cycle_gptr< U > &y) noexcept -> bool |
| | Greater comparison. More...
|
| |
| template<typename T , typename U > |
| auto | operator<= (const cycle_gptr< T > &x, const cycle_gptr< U > &y) noexcept -> bool |
| | Less or equal comparison. More...
|
| |
| template<typename T > |
| auto | operator<= (const cycle_gptr< T > &x, [[maybe_unused]] std::nullptr_t y) noexcept -> bool |
| | Less or equal comparison. More...
|
| |
| template<typename U > |
| auto | operator<= ([[maybe_unused]] std::nullptr_t x, const cycle_gptr< U > &y) noexcept -> bool |
| | Less or equal comparison. More...
|
| |
| template<typename T , typename U > |
| auto | operator>= (const cycle_gptr< T > &x, const cycle_gptr< U > &y) noexcept -> bool |
| | Greater or equal comparison. More...
|
| |
| template<typename T > |
| auto | operator>= (const cycle_gptr< T > &x, [[maybe_unused]] std::nullptr_t y) noexcept -> bool |
| | Greater or equal comparison. More...
|
| |
| template<typename U > |
| auto | operator>= ([[maybe_unused]] std::nullptr_t x, const cycle_gptr< U > &y) noexcept -> bool |
| | Greater or equal comparison. More...
|
| |
| template<typename T > |
| auto | swap (cycle_gptr< T > &x, cycle_gptr< T > &y) noexcept -> void |
| | Swap two pointers. More...
|
| |
| template<typename Char , typename Traits , typename T > |
| auto | operator<< (std::basic_ostream< Char, Traits > &out, const cycle_gptr< T > &ptr) -> std::basic_ostream< Char, Traits > & |
| | Write pointer to output stream. More...
|
| |
| template<typename T , typename U > |
| auto | static_pointer_cast (const cycle_ptr::cycle_gptr< U > &r) -> cycle_ptr::cycle_gptr< T > |
| | Perform static cast on pointer. More...
|
| |
| template<typename T , typename U > |
| auto | dynamic_pointer_cast (const cycle_ptr::cycle_gptr< U > &r) -> cycle_ptr::cycle_gptr< T > |
| | Perform dynamic cast on pointer. More...
|
| |
| template<typename T , typename U > |
| auto | const_pointer_cast (const cycle_ptr::cycle_gptr< U > &r) -> cycle_ptr::cycle_gptr< T > |
| | Perform const cast on pointer. More...
|
| |
| template<typename T , typename U > |
| auto | reinterpret_pointer_cast (const cycle_ptr::cycle_gptr< U > &r) -> cycle_ptr::cycle_gptr< T > |
| | Perform reinterpret cast on pointer. More...
|
| |
template<typename T>
class cycle_ptr::cycle_gptr< T >
Global (or automatic) scope smart pointer.
This smart pointer models a reference to a target object, from a globally reachable place, such as a function variable.
Use this pointer in function arguments/body, global scope, or objects not participating in the cycle_ptr graph.
It is smaller and faster than cycle_member_ptr.