Unwraps an optional‐like value, using a fallback when it is empty.

Synopsis

Declared in <folly/gen/Base.h>

template<
    class Fallback,
    class UnwrapOr = /* implementation-defined */>
UnwrapOr
unwrapOr(Fallback&& fallback);

Return Value

A sink yielding the unwrapped value or fallback.

Parameters

Name

Description

fallback

The value to use when the source value is empty.

Created with MrDocs