halcheck 1.0
Loading...
Searching...
No Matches
halcheck::lib::optional< T > Class Template Reference

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

#include <optional.hpp>

Public Member Functions

constexpr optional (lib::nullopt_t) noexcept
 
template<typename U = T>
 optional (const optional< U > &other)
 
template<typename U = T>
 optional (const optional< U > &other)
 
template<typename U = T>
 optional (optional< U > &&other)
 
template<typename U = T>
 optional (optional< U > &&other)
 
template<typename U = T, typename... Args>
constexpr optional (lib::in_place_t, Args &&...args)
 
template<typename U = T, typename... Args>
constexpr optional (lib::in_place_t, std::initializer_list< U > ilist, Args &&...args)
 
template<typename U = lib::remove_cvref_t<T>>
constexpr optional (U &&value)
 
template<typename U = lib::remove_cvref_t<T>>
constexpr optional (U &&value)
 
optionaloperator= (lib::nullopt_t)
 
template<typename U = lib::remove_cv_t<T>>
optionaloperator= (U &&other)
 
template<typename U >
optionaloperator= (optional< U > &&other)
 
template<typename U >
optionaloperator= (const optional< U > &other)
 
const value_type * operator-> () const
 
value_type * operator-> ()
 
constexpr bool has_value () const noexcept
 
const T & value () const &
 
T & value () &
 
const T && value () const &&
 
T && value () &&
 
template<typename U = lib::remove_cv_t<T>>
constexpr T value_or (U &&default_value) const &
 
template<typename U = lib::remove_cv_t<T>>
value_or (U &&default_value) &&
 
template<bool _ = std::is_move_constructible<T>() && lib::is_swappable<T>()>
void swap (optional &other) noexcept(std::is_nothrow_move_constructible< T >() &&lib::is_nothrow_swappable< T >())
 

Friends

template<bool _ = true>
void 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

template<typename T>
class halcheck::lib::optional< T >

An implementation of std::optional.

See also
std::optional

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