absl::AnyInvocable::AnyInvocable

Constructs an AnyInvocable from an invocable object.

Synopsis

Declared in <absl/functional/any_invocable.h>

template<class F>
requires internal_any_invocable::CanConvert<Sig, F>::value
AnyInvocable(F&& f);

Description

Upon construction, *this is only empty if f is a function pointer or member pointer type and is null, or if f is an AnyInvocable that is empty.

Parameters

NameDescription
fThe invocable object to wrap.