Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
std::experimental::optional< T > Class Template Reference

template<class T>
class std::experimental::optional< T >

Definition at line 364 of file optional.hpp.

Public Types

typedef T value_type
 

Public Member Functions

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

Private Member Functions

void clear () noexcept
 
Tcontained_val ()
 
constexpr const Tcontained_val () const
 
std::remove_const< T >::typedataptr ()
 
constexpr const Tdataptr () const
 
template<class... Args>
void initialize (Args &&... args) noexcept(noexcept(T(std::forward< Args >(args)...)))
 
template<class U , class... Args>
void initialize (std::initializer_list< U > il, Args &&... args) noexcept(noexcept(T(il, std::forward< Args >(args)...)))
 
constexpr bool initialized () const noexcept
 

#include <optional.hpp>

Inheritance diagram for std::experimental::optional< T >:

Member Typedef Documentation

◆ value_type

template<class T >
typedef T std::experimental::optional< T >::value_type

Definition at line 410 of file optional.hpp.

Constructor & Destructor Documentation

◆ optional() [1/8]

template<class T >
constexpr std::experimental::optional< T >::optional ( )
inlineconstexprnoexcept

Definition at line 413 of file optional.hpp.

◆ optional() [2/8]

template<class T >
constexpr std::experimental::optional< T >::optional ( nullopt_t  )
inlineconstexprnoexcept

Definition at line 414 of file optional.hpp.

◆ optional() [3/8]

template<class T >
std::experimental::optional< T >::optional ( const optional< T > &  rhs)
inline

Definition at line 416 of file optional.hpp.

◆ optional() [4/8]

template<class T >
std::experimental::optional< T >::optional ( optional< T > &&  rhs)
inlinenoexcept

Definition at line 425 of file optional.hpp.

◆ optional() [5/8]

template<class T >
constexpr std::experimental::optional< T >::optional ( const T v)
inlineconstexpr

Definition at line 434 of file optional.hpp.

◆ optional() [6/8]

template<class T >
constexpr std::experimental::optional< T >::optional ( T &&  v)
inlineconstexpr

Definition at line 436 of file optional.hpp.

◆ optional() [7/8]

template<class T >
template<class... Args>
constexpr std::experimental::optional< T >::optional ( in_place_t  ,
Args &&...  args 
)
inlineexplicitconstexpr

Definition at line 439 of file optional.hpp.

◆ optional() [8/8]

template<class T >
template<class U , class... Args, TR2_OPTIONAL_REQUIRES(is_constructible< T, std::initializer_list< U > >) >
OPTIONAL_CONSTEXPR_INIT_LIST std::experimental::optional< T >::optional ( in_place_t  ,
std::initializer_list< U >  il,
Args &&...  args 
)
inlineexplicit

Definition at line 443 of file optional.hpp.

◆ ~optional()

template<class T >
std::experimental::optional< T >::~optional ( )
default

Member Function Documentation

◆ clear()

template<class T >
void std::experimental::optional< T >::clear ( )
inlineprivatenoexcept

Definition at line 388 of file optional.hpp.

◆ contained_val() [1/2]

template<class T >
T & std::experimental::optional< T >::contained_val ( )
inlineprivate

Definition at line 385 of file optional.hpp.

◆ contained_val() [2/2]

template<class T >
constexpr const T & std::experimental::optional< T >::contained_val ( ) const
inlineconstexprprivate

Definition at line 384 of file optional.hpp.

◆ dataptr() [1/2]

template<class T >
std::remove_const< T >::type * std::experimental::optional< T >::dataptr ( )
inlineprivate

Definition at line 371 of file optional.hpp.

◆ dataptr() [2/2]

template<class T >
constexpr const T * std::experimental::optional< T >::dataptr ( ) const
inlineconstexprprivate

Definition at line 372 of file optional.hpp.

◆ emplace() [1/2]

template<class T >
template<class... Args>
void std::experimental::optional< T >::emplace ( Args &&...  args)
inline

Definition at line 488 of file optional.hpp.

◆ emplace() [2/2]

template<class T >
template<class U , class... Args>
void std::experimental::optional< T >::emplace ( initializer_list< U >  il,
Args &&...  args 
)
inline

Definition at line 495 of file optional.hpp.

◆ has_value()

template<class T >
constexpr bool std::experimental::optional< T >::has_value ( ) const
inlineconstexprnoexcept

Definition at line 513 of file optional.hpp.

◆ initialize() [1/2]

template<class T >
template<class... Args>
void std::experimental::optional< T >::initialize ( Args &&...  args)
inlineprivatenoexcept

Definition at line 394 of file optional.hpp.

◆ initialize() [2/2]

template<class T >
template<class U , class... Args>
void std::experimental::optional< T >::initialize ( std::initializer_list< U >  il,
Args &&...  args 
)
inlineprivatenoexcept

Definition at line 402 of file optional.hpp.

◆ initialized()

template<class T >
constexpr bool std::experimental::optional< T >::initialized ( ) const
inlineconstexprprivatenoexcept

Definition at line 370 of file optional.hpp.

◆ operator bool()

template<class T >
constexpr std::experimental::optional< T >::operator bool ( ) const
inlineexplicitconstexprnoexcept

Definition at line 512 of file optional.hpp.

◆ operator*() [1/2]

template<class T >
T & std::experimental::optional< T >::operator* ( )
inline

Definition at line 564 of file optional.hpp.

◆ operator*() [2/2]

template<class T >
constexpr T const & std::experimental::optional< T >::operator* ( ) const
inlineconstexpr

Definition at line 560 of file optional.hpp.

◆ operator->() [1/2]

template<class T >
T * std::experimental::optional< T >::operator-> ( )
inline

Definition at line 555 of file optional.hpp.

◆ operator->() [2/2]

template<class T >
constexpr T const * std::experimental::optional< T >::operator-> ( ) const
inlineconstexpr

Definition at line 515 of file optional.hpp.

◆ operator=() [1/4]

template<class T >
optional & std::experimental::optional< T >::operator= ( const optional< T > &  rhs)
inline

Definition at line 456 of file optional.hpp.

◆ operator=() [2/4]

template<class T >
optional & std::experimental::optional< T >::operator= ( nullopt_t  )
inlinenoexcept

Definition at line 450 of file optional.hpp.

◆ operator=() [3/4]

template<class T >
optional & std::experimental::optional< T >::operator= ( optional< T > &&  rhs)
inlinenoexcept

Definition at line 464 of file optional.hpp.

◆ operator=() [4/4]

template<class T >
template<class U >
auto std::experimental::optional< T >::operator= ( U &&  v) -> typename enable_if < is_same<typename decay<U>::type, T>::value, optional& >::type
inline

Definition at line 474 of file optional.hpp.

◆ reset()

template<class T >
void std::experimental::optional< T >::reset ( )
inlinenoexcept

Definition at line 616 of file optional.hpp.

◆ swap()

template<class T >
void std::experimental::optional< T >::swap ( optional< T > &  rhs)
inlinenoexcept

Definition at line 502 of file optional.hpp.

◆ value() [1/2]

template<class T >
T & std::experimental::optional< T >::value ( )
inline

Definition at line 573 of file optional.hpp.

◆ value() [2/2]

template<class T >
constexpr T const & std::experimental::optional< T >::value ( ) const
inlineconstexpr

Definition at line 569 of file optional.hpp.

◆ value_or()

template<class T >
template<class V >
constexpr T std::experimental::optional< T >::value_or ( V &&  v) const
inlineconstexpr

Definition at line 608 of file optional.hpp.

Collaboration diagram for std::experimental::optional< T >:

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