|
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 19 of file optional_storage.hpp.
|
constexprdefaultnoexcept |
|
inlineconstexpr |
Definition at line 23 of file optional_storage.hpp.
References m_has_value, m_storage, and OptionalStorage().
|
delete |
References OptionalStorage().
|
delete |
References OptionalStorage().
|
inlineconstexprnoexcept |
Definition at line 35 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 43 of file optional_storage.hpp.
|
inlineconstexprnoexcept |
Definition at line 67 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 57 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
constexprdeletenoexcept |
|
inlineconstexprnoexcept |
Definition at line 62 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 88 of file optional_storage.hpp.
References m_has_value.
|
inlineexplicitconstexprnoexcept |
Definition at line 84 of file optional_storage.hpp.
References m_has_value.
|
inlineconstexprnoexcept |
Definition at line 79 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
inlineconstexprnoexcept |
Definition at line 74 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
delete |
References OptionalStorage().
|
delete |
References OptionalStorage().
|
inlineconstexprnoexcept |
Definition at line 51 of file optional_storage.hpp.
References m_has_value, and m_storage.
|
private |
Definition at line 94 of file optional_storage.hpp.
|
private |
Definition at line 93 of file optional_storage.hpp.