userver: utils::expected< void, E > Class Template Reference
Loading...
Searching...
No Matches
utils::expected< void, E > Class Template Reference

Detailed Description

template<class E>
class utils::expected< void, E >

Definition at line 148 of file expected.hpp.

Public Member Functions

 expected (const unexpected< E > &error)
 expected (unexpected< E > &&error)
template<class G>
requires std::is_convertible_v<G, E>
 expected (const unexpected< G > &error)
template<class G>
requires std::is_convertible_v<G, E>
 expected (unexpected< G > &&error)
bool has_value () const noexcept
 operator bool () const noexcept
void value () const
E & error ()
const E & error () const
void & operator* () &noexcept
 Unchecked access to the contained value.
void * operator-> () noexcept
 Unchecked access to the members of the contained value.

Constructor & Destructor Documentation

◆ expected() [1/5]

template<class E>
utils::expected< void, E >::expected ( )
constexprnoexcept

Definition at line 358 of file expected.hpp.

◆ expected() [2/5]

template<class E>
utils::expected< void, E >::expected ( const unexpected< E > & error)

Definition at line 361 of file expected.hpp.

◆ expected() [3/5]

template<class E>
utils::expected< void, E >::expected ( unexpected< E > && error)

Definition at line 366 of file expected.hpp.

◆ expected() [4/5]

template<class E>
requires std::is_convertible_v<G, E>
template<class G>
requires std::is_convertible_v<G, E>
utils::expected< void, E >::expected ( const unexpected< G > & error)

Definition at line 373 of file expected.hpp.

◆ expected() [5/5]

template<class E>
requires std::is_convertible_v<G, E>
template<class G>
requires std::is_convertible_v<G, E>
utils::expected< void, E >::expected ( unexpected< G > && error)

Definition at line 380 of file expected.hpp.

Member Function Documentation

◆ error() [1/2]

template<class E>
E & utils::expected< void, E >::error ( )

Definition at line 402 of file expected.hpp.

◆ error() [2/2]

template<class E>
const E & utils::expected< void, E >::error ( ) const

Definition at line 411 of file expected.hpp.

◆ has_value()

template<class E>
bool utils::expected< void, E >::has_value ( ) const
noexcept

Definition at line 385 of file expected.hpp.

◆ operator bool()

template<class E>
utils::expected< void, E >::operator bool ( ) const
explicitnoexcept

Definition at line 390 of file expected.hpp.

◆ operator*()

void & utils::expected< void, E >::operator* ( ) &
noexcept

Unchecked access to the contained value.

Warning
The behavior is undefined if *this does not contain a value; use value for checked access.

Definition at line 120 of file expected.hpp.

◆ operator->()

void * utils::expected< void, E >::operator-> ( )
noexcept

Unchecked access to the members of the contained value.

Warning
The behavior is undefined if *this does not contain a value; use value for checked access.

Definition at line 130 of file expected.hpp.

◆ value()

template<class E>
void utils::expected< void, E >::value ( ) const

Definition at line 395 of file expected.hpp.


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