Hyper API for C++  0.0.15888
Hyper client library for C++ applications
hyperapi::optional< T > Class Template Reference

Surrogate for C++17 std::optional More...

#include <optional.hpp>

Public Types

using value_type = T
 The value type.
 

Public Member Functions

 optional () noexcept=default
 Constructor.
 
 optional (const optional &other)
 Copy constructor.
 
 optional (optional &&other)
 Move constructor.
 
template<typename U = value_type, typename = typename std::enable_if<!std::is_same<typename std::decay<U>::type, optional<T>>::value>::type>
 optional (U &&value)
 Constructor.
 
optionaloperator= (const optional &other)
 Copy assignment.
 
optionaloperator= (optional &&other)
 Move assignment.
 
template<typename Other >
bool operator== (const optional< Other > &other) const noexcept
 Comparison.
 
template<typename Other >
bool operator!= (const optional< Other > &other) const noexcept
 Comparison.
 
 ~optional ()
 Destructor.
 
bool has_value () const noexcept
 Checks whether *this contains a value.
 
 operator bool () const noexcept
 Checks whether *this contains a value.
 
T & value () &
 Value access.
 
const T & value () const &
 Value access.
 
T && value () &&
 Value access.
 
const T && value () const &&
 Value access.
 
template<typename U >
value_or (U &&default_value) const &
 Value or default.
 
template<typename U >
value_or (U &&default_value) &&
 Value or default.
 
T * operator-> () noexcept
 Value access.
 
const T * operator-> () const noexcept
 Value access.
 
const T & operator* () const &
 Value access.
 
T & operator* () &
 Value access.
 
const T && operator* () const &&
 Value access.
 
T && operator* () &&
 Value access.
 
void reset () noexcept
 Reset.
 
void swap (optional &other)
 Swap.
 
template<typename... Args>
void emplace (Args &&... args)
 Emplace.
 

Detailed Description

template<typename T>
class hyperapi::optional< T >

Surrogate for C++17 std::optional

Definition at line 40 of file optional.hpp.


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