Namespaces
Variants
Views
Actions

cpp/experimental/optional/operator*

From cppreference.com
< cpp‎ | experimental‎ | optional
Revision as of 07:03, 9 June 2013 by P12 (Talk | contribs)

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

constexpr const T* operator->() const;
(1) (since C++14)
T* operator->();
(1) (since C++14)
constexpr const T& operator*() const;
(2) (since C++14)
T& operator*();
(2) (since C++14)

Accesses the contained value.

1) Returns a pointer to the contained value.
2) Returns a reference to the contained value.

The behavior is undefined if *this is in disengaged state.

Parameters

(none)

Return value

Pointer or reference to the contained value.

Exceptions

(none)