halcheck 1.0
Loading...
Searching...
No Matches
lib/optional

An implementation of std::optional. More...

Classes

struct  halcheck::lib::nullopt_t
 An implementation of std::nullopt_t. More...
 
struct  halcheck::lib::bad_optional_access
 An implementation of std::bad_optional_access. More...
 
class  halcheck::lib::optional< T >
 An implementation of std::optional. More...
 
struct  halcheck::lib::optional< void >
 A specialization of optional for "void". More...
 
struct  halcheck::lib::optional< const void >
 A specialization of optional for "const void". More...
 
struct  halcheck::lib::optional< volatile void >
 A specialization of optional for "volatile void". More...
 
struct  halcheck::lib::optional< const volatile void >
 A specialization of optional for "const volatile void". More...
 

Functions

template<typename T >
constexpr lib::optional< lib::decay_t< T > > halcheck::lib::make_optional (T &&value)
 An implementation of std::make_optional.
 
template<typename T , typename... Args>
constexpr lib::optional< T > halcheck::lib::make_optional (Args &&...args)
 An implementation of std::make_optional.
 
template<typename T , typename U , typename... Args>
constexpr lib::optional< T > halcheck::lib::make_optional (const std::initializer_list< U > &ilist, Args &&...args)
 An implementation of std::make_optional.
 
template<typename T , typename U >
bool halcheck::lib::operator== (const lib::optional< T > &lhs, const lib::optional< U > &rhs)
 An implementation of std::optional::operator==.
 
template<typename T >
bool halcheck::lib::operator== (const lib::nullopt_t &, const lib::optional< T > &value)
 An implementation of std::optional::operator==.
 
template<typename T >
bool halcheck::lib::operator== (const lib::optional< T > &value, const lib::nullopt_t &)
 An implementation of std::optional::operator==.
 
template<typename T , typename U >
bool halcheck::lib::operator== (const U &lhs, const lib::optional< T > &rhs)
 An implementation of std::optional::operator==.
 
template<typename T , typename U >
bool halcheck::lib::operator== (const lib::optional< T > &lhs, const U &rhs)
 An implementation of std::optional::operator==.
 
template<typename T , typename U >
bool halcheck::lib::operator!= (const lib::optional< T > &lhs, const lib::optional< U > &rhs)
 An implementation of std::optional::operator==.
 
template<typename T >
bool halcheck::lib::operator!= (const lib::nullopt_t &, const lib::optional< T > &value)
 An implementation of std::optional::operator==.
 
template<typename T >
bool halcheck::lib::operator!= (const lib::optional< T > &value, const lib::nullopt_t &)
 An implementation of std::optional::operator==.
 
template<typename T , typename U >
bool halcheck::lib::operator!= (const U &lhs, const lib::optional< T > &rhs)
 An implementation of std::optional::operator==.
 
template<typename T , typename U >
bool halcheck::lib::operator!= (const lib::optional< T > &lhs, const U &rhs)
 An implementation of std::optional::operator==.
 

Variables

static constexpr nullopt_t halcheck::lib::nullopt {nullopt_t::tag{}}
 An implementation of std::nullopt.
 

Friends

template<bool _ = true>
void halcheck::lib::optional< T >::swap (lib::optional< T > &lhs, lib::optional< T > &rhs) noexcept(std::is_nothrow_move_constructible< T >() &&lib::is_nothrow_swappable< T >())
 An implementation of std::swap for optional.
 

Detailed Description

An implementation of std::optional.

See also
https://en.cppreference.com/w/cpp/header/optional