|
constexpr | UnownedPointer () noexcept=default |
| Constructor for an empty pointer.
|
|
constexpr | UnownedPointer (const UnownedPointer &) noexcept=default |
| Copy constructor.
|
|
template<typename RelatedElement , typename RelatedDeleter >
requires std::is_constructible_v<std::unique_ptr<Element[], Deleter>, std::unique_ptr<RelatedElement, RelatedDeleter> &&> |
constexpr | UnownedPointer (const UnownedPointer< RelatedElement, RelatedDeleter > &value) noexcept |
| Constructor that sets the value from a related pointer.
|
|
constexpr | UnownedPointer (const std::unique_ptr< Element[], Deleter > &value) noexcept |
| Constructor that sets the value from an std::unique_ptr.
|
|
template<typename RelatedElement , typename RelatedDeleter >
requires std::is_constructible_v<std::unique_ptr<Element[], Deleter>, std::unique_ptr<RelatedElement, RelatedDeleter> &&> |
constexpr | UnownedPointer (const std::unique_ptr< RelatedElement, RelatedDeleter > &value) noexcept |
| Constructor that sets the value from a related std::unique_ptr.
|
|
template<class RawPointer >
requires std::is_constructible_v<std::unique_ptr<Element[], Deleter>, RawPointer> |
constexpr | UnownedPointer (RawPointer value) noexcept |
| Constructor that sets the value from a raw pointer.
|
|
constexpr | UnownedPointer (std::nullptr_t) noexcept |
| Constructor that sets the value to an empty pointer.
|
|
constexpr auto | operator= (const UnownedPointer &) noexcept -> UnownedPointer &=default |
| Assignment operator.
|
|
template<typename RelatedElement , typename RelatedDeleter >
requires std::is_constructible_v<std::unique_ptr<Element[], Deleter>, std::unique_ptr<RelatedElement, RelatedDeleter> &&> |
constexpr auto | operator= (const UnownedPointer< RelatedElement, RelatedDeleter > &value) noexcept -> UnownedPointer & |
| Assignment operator that sets the value from a related pointer.
|
|
constexpr auto | operator= (const std::unique_ptr< Element[], Deleter > &value) noexcept -> UnownedPointer & |
| Assignment operator that sets the value from an std::unique_ptr.
|
|
template<typename RelatedElement , typename RelatedDeleter >
requires std::is_constructible_v<std::unique_ptr<Element[], Deleter>, std::unique_ptr<RelatedElement, RelatedDeleter> &&> |
constexpr auto | operator= (const std::unique_ptr< RelatedElement, RelatedDeleter > &value) noexcept -> UnownedPointer & |
| Assignment operator that sets the value from a related std::unique_ptr.
|
|
constexpr auto | operator= (std::nullptr_t) noexcept -> UnownedPointer & |
| Assignment operator that sets the value to an empty pointer.
|
|
auto | operator[] (std::size_t index) const -> Element & |
| Access to elements of the pointed-to array.
|
|
| operator bool () const noexcept |
| Checks whether the value is non-empty.
|
|
auto | get () const noexcept -> pointer |
| Gets the current value.
|
|
auto | reset (pointer value=pointer()) noexcept -> void |
| Sets a new value.
|
|
auto | reset (std::nullptr_t=nullptr) noexcept -> void |
| Empties the pointer.
|
|
auto | swap (UnownedPointer &other) noexcept -> void |
| Swaps the value with another unowned pointer.
|
|
template<typename Element, typename Deleter>
class xentara::utils::tools::UnownedPointer< Element[], Deleter >
Template specialization of UnownedPointer for array types.