Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Detailed Semantics - Optional Values

[Note] Note

The following section contains various assert() which are used only to show the postconditions as sample code. It is not implied that the type T must support each particular expression but that if the expression is supported, the implied condition holds.

space

optional<T>::optional() noexcept;

space

optional<T>::optional( none_t ) noexcept;

space

optional<T>::optional( T const& v )

space

optional<T>::optional( T&& v )

space

optional<T>::optional( bool condition, T const& v ) ;

optional<T>::optional( T const& v )

optional<T>::optional()

space

optional<T>::optional( optional const& rhs );

space

optional<T>::optional( optional&& rhs ) noexcept(see below);

space

template<U> explicit optional<T>::optional( optional<U> const& rhs );

space

template<U> explicit optional<T>::optional( optional<U>&& rhs );

space

template<class... Args> explicit optional<T>::optional( in_place_init_t, Args&&... ars );

space

template<class... Args> explicit optional<T>::optional( in_place_init_if_t, bool condition, Args&&... ars );

space

template<InPlaceFactory> explicit optional<T>::optional( InPlaceFactory const& f );

template<TypedInPlaceFactory> explicit optional<T>::optional( TypedInPlaceFactory const& f );

space

optional& optional<T>::operator= ( none_t ) noexcept;

space

optional& optional<T>::operator= ( T const& rhs ) ;

space

optional& optional<T>::operator= ( T&& rhs ) ;

space

optional& optional<T>::operator= ( optional const& rhs ) ;

space

optional& optional<T>::operator= ( optional&& rhs ) noexcept(see below);

space

template<U> optional& optional<T>::operator= ( optional<U> const& rhs ) ;

space

template<U> optional& optional<T>::operator= ( optional<U>&& rhs ) ;

space

template<class... Args> void optional<T>::emplace( Args&&... args );

space

template<InPlaceFactory> optional<T>& optional<T>::operator=( InPlaceFactory const& f );

template<TypedInPlaceFactory> optional<T>& optional<T>::operator=( TypedInPlaceFactory const& f );

space

void optional<T>::reset( T const& v ) ;

space

void optional<T>::reset() noexcept ;

space

T const& optional<T>::get() const ;

T& optional<T>::get() ;

inline T const& get ( optional<T> const& ) ;

inline T& get ( optional<T> &) ;

space

T const& optional<T>::operator*() const& ;

T& optional<T>::operator*() &;

space

T&& optional<T>::operator*() &&;

space

T const& optional<T>::value() const& ;

T& optional<T>::value() & ;

space

T&& optional<T>::value() && ;

space

template<class U> T optional<T>::value_or(U && v) const& ;

space

template<class U> T optional<T>::value_or(U && v) && ;

space

template<class F> T optional<T>::value_or_eval(F f) const& ;

space

template<class F> T optional<T>::value_or_eval(F f) && ;

space

template<class F> auto optional<T>::map(F f) const& -> see below ;

template<class F> auto optional<T>::map(F f) & -> see below ;

space

template<class F> auto optional<T>::map(F f) && -> see below ;

space

template<class F> auto optional<T>::flat_map(F f) const& -> see below ;

template<class F> auto optional<T>::flat_map(F f) & -> see below ;

template<class F> auto optional<T>::flat_map(F f) && -> see below ;

space

T const& optional<T>::get_value_or( T const& default) const ;

T& optional<T>::get_value_or( T& default ) ;

space

T const* optional<T>::get_ptr() const ;

T* optional<T>::get_ptr() ;

space

T const* optional<T>::operator ->() const ;

T* optional<T>::operator ->() ;

space

explicit optional<T>::operator bool() const noexcept ;

bool optional<T>::has_value() const noexcept ;

space

bool optional<T>::operator!() noexcept ;

space

bool optional<T>::is_initialized() const ;


PrevUpHomeNext