xentara-workbench-plugin v1.3
The Xentara Workbench Plugin Framework
Loading...
Searching...
No Matches
xentara::workbench::bindings::Undefined< Value > Class Template Reference

A value that allows assigning and initializing undefined value for ValueOrUndefined. More...

#include <xentara/workbench/bindings/ValueOrUndefined.hpp>

Public Member Functions

template<class InitValue = Value>
constexpr Undefined (InitValue &&value)
 Move that initializes the value.
 
template<class... Arguments>
constexpr Undefined (std::in_place_t, Arguments &&...arguments)
 Move that initializes the value.
 
template<class InitValue , class... Arguments>
constexpr Undefined (std::in_place_t, std::initializer_list< InitValue > initializerList, Arguments &&...arguments)
 Move that initializes the value.
 
constexpr Undefined (const Undefined &)=default
 Copy constructor.
 
constexpr Undefined (Undefined &&)=default
 Move constructor.
 
constexpr auto value () const &noexcept -> const Value &
 Gets the value.
 
constexpr auto value () &noexcept -> Value &
 Gets the value.
 
constexpr auto value () const &&noexcept -> const Value &&
 Gets the value.
 
constexpr auto value () &&noexcept -> Value &&
 Gets the value.
 
constexpr auto swap (Undefined &other) -> void
 Swaps two undefined values.
 

Detailed Description

template<typename Value = void>
class xentara::workbench::bindings::Undefined< Value >

A value that allows assigning and initializing undefined value for ValueOrUndefined.

This type is used in a similar way to std::unexpected, except that it is used for ValueOrUndefined objects rather than std::expected objects.

Constructor & Destructor Documentation

◆ Undefined() [1/5]

template<typename Value = void>
template<class InitValue = Value>
constexpr xentara::workbench::bindings::Undefined< Value >::Undefined ( InitValue &&  value)
explicitconstexpr

Move that initializes the value.

◆ Undefined() [2/5]

template<typename Value = void>
template<class... Arguments>
constexpr xentara::workbench::bindings::Undefined< Value >::Undefined ( std::in_place_t  ,
Arguments &&...  arguments 
)
explicitconstexpr

Move that initializes the value.

◆ Undefined() [3/5]

template<typename Value = void>
template<class InitValue , class... Arguments>
constexpr xentara::workbench::bindings::Undefined< Value >::Undefined ( std::in_place_t  ,
std::initializer_list< InitValue >  initializerList,
Arguments &&...  arguments 
)
explicitconstexpr

Move that initializes the value.

◆ Undefined() [4/5]

template<typename Value = void>
constexpr xentara::workbench::bindings::Undefined< Value >::Undefined ( const Undefined< Value > &  )
constexprdefault

Copy constructor.

◆ Undefined() [5/5]

template<typename Value = void>
constexpr xentara::workbench::bindings::Undefined< Value >::Undefined ( Undefined< Value > &&  )
constexprdefault

Move constructor.

Member Function Documentation

◆ swap()

template<typename Value = void>
constexpr auto xentara::workbench::bindings::Undefined< Value >::swap ( Undefined< Value > &  other) -> void
constexpr

Swaps two undefined values.

◆ value() [1/4]

template<typename Value = void>
constexpr auto xentara::workbench::bindings::Undefined< Value >::value ( ) && -> Value &&
constexprnoexcept

Gets the value.

◆ value() [2/4]

template<typename Value = void>
constexpr auto xentara::workbench::bindings::Undefined< Value >::value ( ) & -> Value &
constexprnoexcept

Gets the value.

◆ value() [3/4]

template<typename Value = void>
constexpr auto xentara::workbench::bindings::Undefined< Value >::value ( ) const && -> const Value &&
constexprnoexcept

Gets the value.

◆ value() [4/4]

template<typename Value = void>
constexpr auto xentara::workbench::bindings::Undefined< Value >::value ( ) const & -> const Value &
constexprnoexcept

Gets the value.