libhatchet
Loading...
Searching...
No Matches
hxexpected.hpp File Reference

Go to the source code of this file.

Classes

class  hxexpected< T, E_ >
class  hxkey_equal_t< hxexpected< T, E_ > >
class  hxkey_hash_t< hxexpected< T, E_ > >

Functions

template<typename T>
hxexpected< T > hxmake_expected (const T &value_)
template<typename T, typename E_, typename... args_t_>
hxexpected< T, E_ > hxmake_expected (args_t_ &&... args_)

Detailed Description

An expected value type.

Implements std::expected<T, E>.

Function Documentation

◆ hxmake_expected() [1/2]

template<typename T, typename E_, typename... args_t_>
hxexpected< T, E_ > hxmake_expected ( args_t_ &&... args_)

hxmake_expected<T, E> - Returns an non-null hxexpected<T, E> constructed in place by forwarding args to the constructor of T.

  • args : Arguments forwarded to the constructor of T.

◆ hxmake_expected() [2/2]

template<typename T>
hxexpected< T > hxmake_expected ( const T & value_)

hxmake_expected<T> - Returns an non-null hxexpected<T> constructed by copying value.

  • value : The value to copy into the expected value.