folly::get_pointer

Returns a pointer to the value of an Optional, or nullptr if empty.

Synopsis

Declared in <folly/Optional.h>

template<class T>
T const*
get_pointer(Optional<T> const& opt);

Return Value

A const pointer to the value, or nullptr if empty.

Parameters

NameDescription
optThe Optional to inspect.