|
kokkos-execution 0.0.1
|
Data structure that has an interface similar to std::optional but stores the value with stdexec::__manual_lifetime.
More...
#include <optional_storage.hpp>
Public Member Functions | |
| constexpr | OptionalStorage () noexcept=default |
| constexpr | ~OptionalStorage () |
| OptionalStorage (const OptionalStorage &)=delete | |
| OptionalStorage (OptionalStorage &&)=delete | |
| OptionalStorage & | operator= (const OptionalStorage &)=delete |
| OptionalStorage & | operator= (OptionalStorage &&)=delete |
| template<typename... Args> | |
| constexpr auto | emplace (Args &&... args) noexcept(std::is_nothrow_constructible_v< T, Args... >) -> T & |
| template<typename Func, typename... Args> | |
| constexpr auto | emplace_from (Func &&func, Args &&... args) noexcept(noexcept(T{std::forward< Func >(func)(std::forward< Args >(args)...)})) -> T & |
| constexpr void | reset () noexcept |
| constexpr auto | get () &noexcept -> T & |
| constexpr auto | get () const &noexcept -> const T & |
| constexpr auto | get () &&noexcept -> T && |
| constexpr auto | get () const &&noexcept -> const T &&=delete |
| constexpr auto | operator-> () noexcept -> T * |
| constexpr auto | operator-> () const noexcept -> const T * |
| constexpr | operator bool () const noexcept |
| constexpr bool | has_value () const noexcept |
Private Attributes | |
| stdexec::__manual_lifetime< T > | m_storage {} |
| bool | m_has_value {false} |
Data structure that has an interface similar to std::optional but stores the value with stdexec::__manual_lifetime.
std::optional, the boolean member m_has_value tracks if the storage has been populated or not.std::optional, it will destroy the underlying storage automatically in the destructor if m_has_value is true.stdexec::__manual_lifetime: it is not movable, and can be used as a placeholder storage for types that are not movable, like stdexec operation states. Notably, the member function emplace_from allows in-place construction from the result of a callable.Definition at line 21 of file optional_storage.hpp.
|
constexprdefaultnoexcept |
|
inlineconstexpr |
Definition at line 25 of file optional_storage.hpp.
References m_has_value, m_storage, and OptionalStorage().
|
delete |
References OptionalStorage().
|
delete |
References OptionalStorage().
|
inlineconstexprnoexcept |
Definition at line 37 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 45 of file optional_storage.hpp.
|
inlineconstexprnoexcept |
Definition at line 69 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 59 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
constexprdeletenoexcept |
|
inlineconstexprnoexcept |
Definition at line 64 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 90 of file optional_storage.hpp.
References m_has_value.
|
inlineexplicitconstexprnoexcept |
Definition at line 86 of file optional_storage.hpp.
References m_has_value.
|
inlineconstexprnoexcept |
Definition at line 81 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 76 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
delete |
References OptionalStorage().
|
delete |
References OptionalStorage().
|
inlineconstexprnoexcept |
Definition at line 53 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
private |
Definition at line 96 of file optional_storage.hpp.
|
private |
Definition at line 95 of file optional_storage.hpp.