Namespaces
Variants
Views
Actions

cpp/experimental/optional/value

From cppreference.com
< cpp‎ | experimental‎ | optional
Revision as of 15:55, 1 July 2013 by P12bot (Talk | contribs)

Template:cpp/utility/optional/title Template:cpp/utility/optional/navbar

constexpr const T& value() const;
(since C++14)
T& value();
(since C++14)

Returns the contained value.

Contents

Parameters

(none)

Return value

A reference to the contained value.

Exceptions

std::bad_optional_access if *this is in disengaged state.

See also

Template:cpp/utility/optional/dsc value or