momemta::gtl::optional< T > Class Template Reference

Detailed Description

template<typename T>
class momemta::gtl::optional< T >

Definition at line 85 of file optional.h.

Inheritance diagram for momemta::gtl::optional< T >:

Public Types

typedef T value_type
 

Public Member Functions

constexpr optional (nullopt_t) noexcept
 
 optional (const optional &src)=default
 
 optional (optional &&src)=default
 
template<typename... Args>
constexpr optional (in_place_t, Args &&... args)
 
template<typename U , typename... Args, typename = typename std::enable_if<std::is_constructible< T, std::initializer_list<U>&, Args&&...>::value>::type>
constexpr optional (in_place_t, std::initializer_list< U > il, Args &&... args)
 
template<typename U = T, typename std::enable_if< std::is_constructible< T, U &&>::value &&!std::is_same< in_place_t, typename std::decay< U >::type >::value &&!std::is_same< optional< T >, typename std::decay< U >::type >::value &&std::is_convertible< U &&, T >::value, bool >::type = false>
constexpr optional (U &&v)
 
template<typename U = T, typename std::enable_if< std::is_constructible< T, U &&>::value &&!std::is_same< in_place_t, typename std::decay< U >::type >::value &&!std::is_same< optional< T >, typename std::decay< U >::type >::value &&!std::is_convertible< U &&, T >::value, bool >::type = false>
constexpr optional (U &&v)
 
template<typename U , typename std::enable_if< std::is_constructible< T, const U &>::value &&!internal_optional::is_constructible_convertible_from_optional< T, U >::value &&std::is_convertible< const U &, T >::value, bool >::type = false>
 optional (const optional< U > &rhs)
 
template<typename U , typename std::enable_if< std::is_constructible< T, const U &>::value &&!internal_optional::is_constructible_convertible_from_optional< T, U >::value &&!std::is_convertible< const U &, T >::value, bool >::type = false>
 optional (const optional< U > &rhs)
 
template<typename U , typename std::enable_if< std::is_constructible< T, U &&>::value &&!internal_optional::is_constructible_convertible_from_optional< T, U >::value &&std::is_convertible< U &&, T >::value, bool >::type = false>
 optional (optional< U > &&rhs)
 
template<typename U , typename std::enable_if< std::is_constructible< T, U &&>::value &&!internal_optional::is_constructible_convertible_from_optional< T, U >::value &&!std::is_convertible< U &&, T >::value, bool >::type = false>
 optional (optional< U > &&rhs)
 
optionaloperator= (nullopt_t) noexcept
 
optionaloperator= (const optional &src)=default
 
optionaloperator= (optional &&src)=default
 
template<typename U = T, typename = typename std::enable_if< !std::is_same<optional<T>, typename std::decay<U>::type>::value && (!std::is_scalar<T>::value || !std::is_same<T, typename std::decay<U>::type>::value) && std::is_constructible<T, U>::value && std::is_assignable<T&, U>::value>::type>
optionaloperator= (U &&v)
 
template<typename U , typename = typename std::enable_if< std::is_constructible<T, const U&>::value && std::is_assignable<T&, const U&>::value && !internal_optional:: is_constructible_convertible_assignable_from_optional< T, U>::value>::type>
optionaloperator= (const optional< U > &rhs)
 
template<typename U , typename = typename std::enable_if< std::is_constructible<T, U>::value && std::is_assignable<T&, U>::value && !internal_optional:: is_constructible_convertible_assignable_from_optional< T, U>::value>::type>
optionaloperator= (optional< U > &&rhs)
 
void reset () noexcept
 
template<typename... Args, typename = typename std::enable_if< std::is_constructible<T, Args&&...>::value>::type>
void emplace (Args &&... args)
 
template<class U , class... Args, typename = typename std::enable_if<std::is_constructible< T, std::initializer_list<U>&, Args&&...>::value>::type>
void emplace (std::initializer_list< U > il, Args &&... args)
 
void swap (optional &rhs) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_trivial< T >::value)
 
constexpr const T * operator-> () const
 
T * operator-> ()
 
constexpr const T & operator* () const &
 
T & operator* () &
 
constexpr const T && operator* () const &&
 
T && operator* () &&
 
constexpr operator bool () const noexcept
 
constexpr bool has_value () const noexcept
 
const T & value () const &
 
T & value () &
 
T && value () &&
 
const T && value () const &&
 
template<class U >
constexpr T value_or (U &&v) const &
 
template<class U >
value_or (U &&v) &&
 

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