Namespaces
Variants
Views
Actions

std::experimental::optional::value

From cppreference.com
< cpp‎ | experimental‎ | optional
Revision as of 18:39, 16 March 2014 by P12bot (Talk | contribs)

 
 
Technical specifications
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals 2 TS)
Extensions for parallelism (parallelism TS)
Concepts (concepts TS)
Extensions for concurrency (concurrency TS)
Special mathematical functions (special math TR)
 
 
 
constexpr const T& value() const;
(library fundamentals TS)
T& value();
(library fundamentals TS)

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

returns the contained value if available, another value otherwise
(public member function) [edit]