template<typename T>
class AOptional< T >
Utility wrapper implementing the stack-allocated (fast) optional idiom.
- Examples
- /github/workspace/aui.views/src/AUI/View/AView.h.
|
constexpr | AOptional (std::nullopt_t) noexcept |
|
template<typename U = T, std::enable_if_t< std::is_constructible_v< T, U > &&std::is_convertible_v< U &&, T >, bool > = true> |
constexpr | AOptional (U &&rhs) noexcept |
|
template<typename U = T, std::enable_if_t< std::is_constructible_v< T, U > &&!std::is_convertible_v< U &&, T >, bool > = true> |
constexpr | AOptional (U &&rhs) noexcept |
|
constexpr | AOptional (const AOptional &rhs) |
|
constexpr | AOptional (AOptional &&rhs) noexcept |
|
template<typename U > |
constexpr | AOptional (const AOptional< U > &rhs) |
|
template<typename U > |
constexpr | AOptional (AOptional< U > &&rhs) noexcept |
|
bool | hasValue () const noexcept |
|
constexpr | operator bool () const noexcept |
|
template<typename... Args> |
constexpr AOptional< T > & | emplace (Args &&... args) |
|
constexpr AOptional< T > & | operator= (std::nullopt_t) noexcept |
|
template<typename U = T, typename std::enable_if_t< std::is_convertible_v< U &&, T >, bool > = true> |
constexpr AOptional< T > & | operator= (U &&rhs) noexcept |
|
constexpr AOptional< T > & | operator= (const AOptional &rhs) noexcept |
|
constexpr AOptional< T > & | operator= (AOptional &&rhs) noexcept |
|
template<typename U > |
constexpr AOptional< T > & | operator= (const AOptional< U > &rhs) noexcept |
|
template<typename U > |
constexpr AOptional< T > & | operator= (AOptional< U > &&rhs) noexcept |
|
template<typename U = T> |
constexpr AOptional< T > & | operator= (T &&rhs) noexcept |
|
T & | value () noexcept |
|
const T & | value () const noexcept |
|
T * | ptr () noexcept |
|
const T * | ptr () const noexcept |
|
T * | operator-> () noexcept |
|
const T * | operator-> () const noexcept |
|
T & | operator* () noexcept |
|
const T & | operator* () const noexcept |
|
void | reset () noexcept |
|
T & | valueOrException (const char *message="empty optional") |
| value or exception
|
|
const T & | valueOrException (const char *message="empty optional") const |
| value or exception
|
|
template<typename F > |
T | valueOr (F &&alternative) const |
| value or alternative (either value or callback) More...
|
|
template<typename U > |
bool | operator== (const AOptional< U > &rhs) const noexcept |
|
template<typename U > |
bool | operator== (const U &rhs) const noexcept |
|
bool | operator== (const std::nullopt_t &rhs) const noexcept |
|
template<aui::invocable< const T & > Mapper> |
auto | map (Mapper &&mapper) -> AOptional< decltype(std::invoke(std::forward< Mapper >(mapper), value()))> const |
| If a value is present, apply the provided mapper function to it. More...
|
|