Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions
c10::optional< T > Class Template Reference
Inheritance diagram for c10::optional< T >:

Public Types

typedef T value_type
 

Public Member Functions

constexpr optional (nullopt_t) noexcept
 
 optional (const optional &rhs)
 
 optional (optional &&rhs) noexcept(std::is_nothrow_move_constructible< T >::value)
 
template<typename U = T, TR2_OPTIONAL_REQUIRES(std::is_constructible< T, U && >::value &&!std::is_same< typename std::decay< U >::type, in_place_t >::value &&!std::is_same< typename std::decay< U >::type, optional< T >>::value &&std::is_convertible< U &&, T >) >
constexpr optional (U &&u)
 
template<typename U = T, TR2_OPTIONAL_REQUIRES(std::is_constructible< T, U && >::value &&!std::is_same< typename std::decay< U >::type, in_place_t >::value &&!std::is_same< typename std::decay< U >::type, optional< T >>::value &&!std::is_convertible< U &&, T >) >
constexpr optional (U &&u)
 
template<class... Args>
constexpr optional (in_place_t, Args &&...args)
 
template<class U , class... Args, TR2_OPTIONAL_REQUIRES(std::is_constructible< T, std::initializer_list< U >>) >
OPTIONAL_CONSTEXPR_INIT_LIST optional (in_place_t, std::initializer_list< U > il, Args &&...args)
 
optionaloperator= (nullopt_t) noexcept
 
optionaloperator= (const optional &rhs)
 
optionaloperator= (optional &&rhs) noexcept(std::is_nothrow_move_assignable< T >::value &&std::is_nothrow_move_constructible< T >::value)
 
template<class U = T>
auto operator= (U &&v) -> typename std::enable_if< std::is_constructible< T, U >::value &&!std::is_same< typename std::decay< U >::type, optional< T >>::value &&(std::is_scalar< T >::value||std::is_same< typename std::decay< U >::type, T >::value)&&std::is_assignable< T &, U >::value, optional & >::type
 
template<class... Args>
void emplace (Args &&...args)
 
template<class U , class... Args>
void emplace (std::initializer_list< U > il, Args &&...args)
 
void swap (optional< T > &rhs) noexcept(std::is_nothrow_move_constructible< T >::value &&noexcept(swap(std::declval< T & >(), std::declval< T & >())))
 
constexpr operator bool () const noexcept
 
constexpr bool has_value () const noexcept
 
constexpr T const * operator-> () const
 
Toperator-> ()
 
constexpr T const & operator* () const
 
Toperator* ()
 
constexpr T const & value () const
 
Tvalue ()
 
template<class V >
constexpr T value_or (V &&v) const
 
void reset () noexcept
 

Detailed Description

template<class T>
class c10::optional< T >

Definition at line 118 of file Optional.h.


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