Public Types | Public Member Functions | Private Member Functions
absl::optional< T > Class Template Reference

#include <optional.h>

Inheritance diagram for absl::optional< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef T value_type

Public Member Functions

template<typename... Args, typename = typename std::enable_if< std::is_constructible<T, Args&&...>::value>::type>
T & emplace (Args &&...args)
template<typename U , typename... Args, typename = typename std::enable_if<std::is_constructible< T, std::initializer_list<U>&, Args&&...>::value>::type>
T & emplace (std::initializer_list< U > il, Args &&...args)
constexpr bool has_value () const noexcept
constexpr operator bool () const noexcept
constexpr const T & operator* () const &
T & operator* ()&
constexpr const T && operator* () const &&
T && operator* ()&&
const T * operator-> () const
T * operator-> ()
optionaloperator= (nullopt_t) noexcept
optionaloperator= (const optional &src)
optionaloperator= (optional &&src)
template<typename U = T, typename = typename std::enable_if<absl::conjunction< absl::negation< std::is_same<optional<T>, typename std::decay<U>::type>>, absl::negation< absl::conjunction<std::is_scalar<T>, std::is_same<T, typename std::decay<U>::type>>>, std::is_constructible<T, U>, std::is_assignable<T&, U>>::value>::type>
optionaloperator= (U &&v)
template<typename U , typename = typename std::enable_if<absl::conjunction< absl::negation<std::is_same<T, U>>, std::is_constructible<T, const U&>, std::is_assignable<T&, const U&>, absl::negation< optional_internal:: is_constructible_convertible_assignable_from_optional< T, U>>>::value>::type>
optionaloperator= (const optional< U > &rhs)
template<typename U , typename = typename std::enable_if<absl::conjunction< absl::negation<std::is_same<T, U>>, std::is_constructible<T, U>, std::is_assignable<T&, U>, absl::negation< optional_internal:: is_constructible_convertible_assignable_from_optional< T, U>>>::value>::type>
optionaloperator= (optional< U > &&rhs)
constexpr optional () noexcept
constexpr optional (nullopt_t) noexcept
 optional (const optional &src)
 optional (optional &&src)
template<typename InPlaceT , typename... Args, absl::enable_if_t< absl::conjunction< std::is_same< InPlaceT, in_place_t >, std::is_constructible< T, Args &&...> >::value > * = nullptr>
constexpr optional (InPlaceT, 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< absl::conjunction< absl::negation< std::is_same< in_place_t, typename std::decay< U >::type > >, absl::negation< std::is_same< optional< T >, typename std::decay< U >::type > >, std::is_convertible< U &&, T >, std::is_constructible< T, U && > >::value, bool >::type = false>
constexpr optional (U &&v)
template<typename U = T, typename std::enable_if< absl::conjunction< absl::negation< std::is_same< in_place_t, typename std::decay< U >::type >>, absl::negation< std::is_same< optional< T >, typename std::decay< U >::type >>, absl::negation< std::is_convertible< U &&, T >>, std::is_constructible< T, U && >>::value, bool >::type = false>
constexpr optional (U &&v)
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U > >, std::is_constructible< T, const U & >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U > >, std::is_convertible< const U &, T > >::value, bool >::type = false>
 optional (const optional< U > &rhs)
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U >>, std::is_constructible< T, const U & >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U >>, absl::negation< std::is_convertible< const U &, T >>>::value, bool >::type = false>
 optional (const optional< U > &rhs)
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U > >, std::is_constructible< T, U && >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U > >, std::is_convertible< U &&, T > >::value, bool >::type = false>
 optional (optional< U > &&rhs)
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U >>, std::is_constructible< T, U && >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U >>, absl::negation< std::is_convertible< U &&, T >>>::value, bool >::type = false>
 optional (optional< U > &&rhs)
ABSL_ATTRIBUTE_REINITIALIZES void reset () noexcept
void swap (optional &rhs) noexcept(std
constexpr const T & value () const &
T & value ()&
T && value ()&&
constexpr const T && value () const &&
template<typename U >
constexpr T value_or (U &&v) const &
template<typename U >
value_or (U &&v)&&
 ~optional ()

Private Member Functions

constexpr const T & reference () const
T & reference ()
 static_assert (!std::is_same< nullopt_t, typename std::remove_cv< T >::type >::value,"optional<nullopt_t> is not allowed.")
 static_assert (!std::is_same< in_place_t, typename std::remove_cv< T >::type >::value,"optional<in_place_t> is not allowed.")
 static_assert (!std::is_reference< T >::value,"optional<reference> is not allowed.")

Detailed Description

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

Definition at line 116 of file optional.h.


Member Typedef Documentation

template<typename T>
typedef T absl::optional< T >::value_type

Definition at line 124 of file optional.h.


Constructor & Destructor Documentation

template<typename T>
constexpr absl::optional< T >::optional ( ) [inline]

Definition at line 130 of file optional.h.

template<typename T>
constexpr absl::optional< T >::optional ( nullopt_t  ) [inline]

Definition at line 133 of file optional.h.

template<typename T>
absl::optional< T >::optional ( const optional< T > &  src)
template<typename T>
absl::optional< T >::optional ( optional< T > &&  src)
template<typename T>
template<typename InPlaceT , typename... Args, absl::enable_if_t< absl::conjunction< std::is_same< InPlaceT, in_place_t >, std::is_constructible< T, Args &&...> >::value > * = nullptr>
constexpr absl::optional< T >::optional ( InPlaceT  ,
Args &&...  args 
) [inline, explicit]

Definition at line 149 of file optional.h.

template<typename T>
template<typename U , typename... Args, typename = typename std::enable_if<std::is_constructible< T, std::initializer_list<U>&, Args&&...>::value>::type>
constexpr absl::optional< T >::optional ( in_place_t  ,
std::initializer_list< U >  il,
Args &&...  args 
) [inline, explicit]

Definition at line 159 of file optional.h.

template<typename T>
template<typename U = T, typename std::enable_if< absl::conjunction< absl::negation< std::is_same< in_place_t, typename std::decay< U >::type > >, absl::negation< std::is_same< optional< T >, typename std::decay< U >::type > >, std::is_convertible< U &&, T >, std::is_constructible< T, U && > >::value, bool >::type = false>
constexpr absl::optional< T >::optional ( U &&  v) [inline]

Definition at line 175 of file optional.h.

template<typename T>
template<typename U = T, typename std::enable_if< absl::conjunction< absl::negation< std::is_same< in_place_t, typename std::decay< U >::type >>, absl::negation< std::is_same< optional< T >, typename std::decay< U >::type >>, absl::negation< std::is_convertible< U &&, T >>, std::is_constructible< T, U && >>::value, bool >::type = false>
constexpr absl::optional< T >::optional ( U &&  v) [inline, explicit]

Definition at line 188 of file optional.h.

template<typename T>
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U > >, std::is_constructible< T, const U & >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U > >, std::is_convertible< const U &, T > >::value, bool >::type = false>
absl::optional< T >::optional ( const optional< U > &  rhs) [inline]

Definition at line 202 of file optional.h.

template<typename T>
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U >>, std::is_constructible< T, const U & >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U >>, absl::negation< std::is_convertible< const U &, T >>>::value, bool >::type = false>
absl::optional< T >::optional ( const optional< U > &  rhs) [inline, explicit]

Definition at line 219 of file optional.h.

template<typename T>
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U > >, std::is_constructible< T, U && >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U > >, std::is_convertible< U &&, T > >::value, bool >::type = false>
absl::optional< T >::optional ( optional< U > &&  rhs) [inline]

Definition at line 236 of file optional.h.

template<typename T>
template<typename U , typename std::enable_if< absl::conjunction< absl::negation< std::is_same< T, U >>, std::is_constructible< T, U && >, absl::negation< optional_internal::is_constructible_convertible_from_optional< T, U >>, absl::negation< std::is_convertible< U &&, T >>>::value, bool >::type = false>
absl::optional< T >::optional ( optional< U > &&  rhs) [inline, explicit]

Definition at line 253 of file optional.h.

template<typename T>
absl::optional< T >::~optional ( )

Member Function Documentation

template<typename T>
template<typename... Args, typename = typename std::enable_if< std::is_constructible<T, Args&&...>::value>::type>
T& absl::optional< T >::emplace ( Args &&...  args) [inline]

Definition at line 354 of file optional.h.

template<typename T>
template<typename U , typename... Args, typename = typename std::enable_if<std::is_constructible< T, std::initializer_list<U>&, Args&&...>::value>::type>
T& absl::optional< T >::emplace ( std::initializer_list< U >  il,
Args &&...  args 
) [inline]

Definition at line 374 of file optional.h.

template<typename T>
constexpr bool absl::optional< T >::has_value ( ) const [inline]

Definition at line 455 of file optional.h.

template<typename T>
constexpr absl::optional< T >::operator bool ( ) const [inline, explicit]

Definition at line 449 of file optional.h.

template<typename T>
constexpr const T& absl::optional< T >::operator* ( ) const [inline]

Definition at line 424 of file optional.h.

template<typename T>
T& absl::optional< T >::operator* ( ) [inline]

Definition at line 427 of file optional.h.

template<typename T>
constexpr const T&& absl::optional< T >::operator* ( ) const [inline]

Definition at line 431 of file optional.h.

template<typename T>
T&& absl::optional< T >::operator* ( ) [inline]

Definition at line 434 of file optional.h.

template<typename T>
const T* absl::optional< T >::operator-> ( ) const [inline]

Definition at line 411 of file optional.h.

template<typename T>
T* absl::optional< T >::operator-> ( ) [inline]

Definition at line 415 of file optional.h.

template<typename T>
optional& absl::optional< T >::operator= ( nullopt_t  ) [inline]

Definition at line 270 of file optional.h.

template<typename T>
optional& absl::optional< T >::operator= ( const optional< T > &  src)
template<typename T>
optional& absl::optional< T >::operator= ( optional< T > &&  src)
template<typename T>
template<typename U = T, typename = typename std::enable_if<absl::conjunction< absl::negation< std::is_same<optional<T>, typename std::decay<U>::type>>, absl::negation< absl::conjunction<std::is_scalar<T>, std::is_same<T, typename std::decay<U>::type>>>, std::is_constructible<T, U>, std::is_assignable<T&, U>>::value>::type>
optional& absl::optional< T >::operator= ( U &&  v) [inline]

Definition at line 291 of file optional.h.

template<typename T>
template<typename U , typename = typename std::enable_if<absl::conjunction< absl::negation<std::is_same<T, U>>, std::is_constructible<T, const U&>, std::is_assignable<T&, const U&>, absl::negation< optional_internal:: is_constructible_convertible_assignable_from_optional< T, U>>>::value>::type>
optional& absl::optional< T >::operator= ( const optional< U > &  rhs) [inline]

Definition at line 305 of file optional.h.

template<typename T>
template<typename U , typename = typename std::enable_if<absl::conjunction< absl::negation<std::is_same<T, U>>, std::is_constructible<T, U>, std::is_assignable<T&, U>, absl::negation< optional_internal:: is_constructible_convertible_assignable_from_optional< T, U>>>::value>::type>
optional& absl::optional< T >::operator= ( optional< U > &&  rhs) [inline]

Definition at line 322 of file optional.h.

template<typename T>
constexpr const T& absl::optional< T >::reference ( ) const [inline, private]

Definition at line 521 of file optional.h.

template<typename T>
T& absl::optional< T >::reference ( ) [inline, private]

Definition at line 522 of file optional.h.

template<typename T>
ABSL_ATTRIBUTE_REINITIALIZES void absl::optional< T >::reset ( ) [inline]

Definition at line 336 of file optional.h.

template<typename T>
absl::optional< T >::static_assert ( !std::is_same< nullopt_t, typename std::remove_cv< T >::type >::value  ,
"optional<nullopt_t> is not allowed."   
) [private]
template<typename T>
absl::optional< T >::static_assert ( !std::is_same< in_place_t, typename std::remove_cv< T >::type >::value  ,
"optional<in_place_t> is not allowed."   
) [private]
template<typename T>
absl::optional< T >::static_assert ( !std::is_reference< T >::value  ,
"optional<reference> is not allowed."   
) [private]
template<typename T>
void absl::optional< T >::swap ( optional< T > &  rhs) [inline]

Definition at line 383 of file optional.h.

template<typename T>
constexpr const T& absl::optional< T >::value ( ) const [inline]

Definition at line 469 of file optional.h.

template<typename T>
T& absl::optional< T >::value ( ) [inline]

Definition at line 474 of file optional.h.

template<typename T>
T&& absl::optional< T >::value ( ) [inline]

Definition at line 479 of file optional.h.

template<typename T>
constexpr const T&& absl::optional< T >::value ( ) const [inline]

Definition at line 485 of file optional.h.

template<typename T>
template<typename U >
constexpr T absl::optional< T >::value_or ( U &&  v) const [inline]

Definition at line 500 of file optional.h.

template<typename T>
template<typename U >
T absl::optional< T >::value_or ( U &&  v) [inline]

Definition at line 510 of file optional.h.


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


abseil_cpp
Author(s):
autogenerated on Wed Jun 19 2019 19:42:16