| Home | Libraries | People | FAQ | More

### Header <boost/optional/optional.hpp>

#### Synopsis

    // In Header: <boost/optional/optional.hpp>

    namespace boost {

    template <class T>
    class optional ;

    template <class T>
    class optional<T&> ;

    template<class T> inline bool operator == ( optional<T> const& x, optional<T> const& y ) ;

    template<class T> inline bool operator != ( optional<T> const& x, optional<T> const& y ) ;

    template<class T> inline bool operator <  ( optional<T> const& x, optional<T> const& y ) ;

    template<class T> inline bool operator >  ( optional<T> const& x, optional<T> const& y ) ;

    template<class T> inline bool operator <= ( optional<T> const& x, optional<T> const& y ) ;

    template<class T> inline bool operator >= ( optional<T> const& x, optional<T> const& y ) ;

    template<class T> inline bool operator == ( optional<T> const& x, none_t ) noexcept ;

    template<class T> inline bool operator != ( optional<T> const& x, none_t ) noexcept ;

    template<class T> inline optional<T> make_optional ( T const& v ) ;

    template<class T> inline optional<T> make_optional ( bool condition, T const& v ) ;

    template<class T> inline auto get_optional_value_or ( optional<T> const& opt, typename optional<T>::reference_const_type def ) -> typename optional<T>::reference_const_type;

    template<class T> inline auto get_optional_value_or ( optional<T> const& opt, typename optional<T>::reference_type def ) -> typename optional<T>::reference_type ;

    template<class T> inline T const& get ( optional<T> const& opt ) ;

    template<class T> inline T& get ( optional<T> & opt ) ;

    template<class T> inline T const* get ( optional<T> const* opt ) ;

    template<class T> inline T* get ( optional<T>* opt ) ;

    template<class T> inline auto get_pointer ( optional<T> const& opt ) -> see below;

    template<class T> inline auto get_pointer ( optional<T> & opt ) -> see below;

    template<class T> inline void swap( optional<T>& x, optional<T>& y ) ;

    template<class T> inline void swap( optional<T&>& x, optional<T&>& y ) ;

    } // namespace boost