Constructs an optional_ref from a const std::optional.

Synopsis

Declared in <absl/types/optional_ref.h>

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

Parameters

Name

Description

input

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

Created with MrDocs