Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::value_result_t< ValueType > Class Template Reference

Intermediary type for constructing a result with a given value_type . More...

Public Member Functions

template<typename... ArgTypes, constraints< std::enable_if_t< all_of_v<!std::is_same< remove_cvref_t< ArgTypes >, value_result_t >::value... > > > = nullptr>
constexpr value_result_t (ArgTypes &&... args) noexcept(std::is_nothrow_constructible< ValueType, ArgTypes... >::value)
 Construct the stored value from the specified arguments.
 
constexpr value_result_t (value_result_t &&)=default
 Move constructor.
 
constexpr value_result_t (value_result_t const &)=default
 Copy constructor.
 
 ~value_result_t ()=default
 destructor
 
template<typename Error>
constexpr operator result< ValueType, Error > () &&noexcept(noexcept(result< ValueType, Error >(in_place_value, std::declval< ValueType && >())))
 Instantiates a result<ValueType,Error> from the contained value instance. Consumes the container.
 
template<typename Error>
constexpr operator result< ValueType, Error > () const &noexcept(noexcept(result< ValueType, Error >(in_place_value, std::declval< ValueType const & >())))
 Instantiates a result<ValueType,Error> from the contained value instance. Consumes the container.
 
constexpr auto operator= (value_result_t &&) -> value_result_t &=default
 Move constructor.
 
constexpr auto operator= (value_result_t const &) -> value_result_t &=default
 Copy assignment.
 

Detailed Description

template<typename ValueType>
class arene::base::value_result_t< ValueType >

Intermediary type for constructing a result with a given value_type .

Note
Generally this should not be constructed manually; it intended as a transient type that allow to construct a result Object while using type deduction for value_type and error_type .
Template Parameters
ValueTypethe value_type of a result constructed from this type.
See also
arene::base::value_result for the factory function that should be used in user code.

Constructor & Destructor Documentation

◆ value_result_t() [1/3]

template<typename ValueType>
template<typename... ArgTypes, constraints< std::enable_if_t< all_of_v<!std::is_same< remove_cvref_t< ArgTypes >, value_result_t >::value... > > > = nullptr>
arene::base::value_result_t< ValueType >::value_result_t ( ArgTypes &&... args)
inlineconstexprnoexcept

Construct the stored value from the specified arguments.

Template Parameters
ArgTypesthe types of the arguments
Parameters
argsThe arguments

◆ value_result_t() [2/3]

template<typename ValueType>
arene::base::value_result_t< ValueType >::value_result_t ( value_result_t< ValueType > const & )
constexprdefault

Copy constructor.

◆ value_result_t() [3/3]

template<typename ValueType>
arene::base::value_result_t< ValueType >::value_result_t ( value_result_t< ValueType > && )
constexprdefault

Move constructor.

◆ ~value_result_t()

template<typename ValueType>
arene::base::value_result_t< ValueType >::~value_result_t ( )
default

destructor

Member Function Documentation

◆ operator result< ValueType, Error >() [1/2]

template<typename ValueType>
template<typename Error>
arene::base::value_result_t< ValueType >::operator result< ValueType, Error > ( ) &&
inlineconstexprnoexcept

Instantiates a result<ValueType,Error> from the contained value instance. Consumes the container.

Template Parameters
Errorthe error_type of the produced result .

◆ operator result< ValueType, Error >() [2/2]

template<typename ValueType>
template<typename Error>
arene::base::value_result_t< ValueType >::operator result< ValueType, Error > ( ) const &
inlineconstexprnoexcept

Instantiates a result<ValueType,Error> from the contained value instance. Consumes the container.

Template Parameters
Errorthe error_type of the produced result .

◆ operator=() [1/2]

template<typename ValueType>
auto arene::base::value_result_t< ValueType >::operator= ( value_result_t< ValueType > && ) -> value_result_t &=default
constexprdefault

Move constructor.

◆ operator=() [2/2]

template<typename ValueType>
auto arene::base::value_result_t< ValueType >::operator= ( value_result_t< ValueType > const & ) -> value_result_t &=default
constexprdefault

Copy assignment.


The documentation for this class was generated from the following file: