Namespaces
Variants
Views
Actions

std::experimental::optional::operator->, std::experimental::optional::operator*

From cppreference.com
constexpr const T* operator->() const;
(1) (library fundamentals TS)
T* operator->();
(1) (library fundamentals TS)
constexpr const T& operator*() const;
(2) (library fundamentals TS)
T& operator*();
(2) (library fundamentals TS)

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.

[edit] Parameters

(none)

[edit] Return value

Pointer or reference to the contained value.

[edit] Exceptions

(none)