Constructs an optional_ref from a mutable std::optional.

Synopsis

Declared in <absl/types/optional_ref.h>

template<
    typename U,
    typename = EnableIfConvertibleFrom<U>>
constexpr
optional_ref(std::optional<U>& input);

Parameters

Name

Description

input

The optional whose value (if any) is referred to.

Created with MrDocs