absl::AnyInvocable::operator=

Assigns an AnyInvocable from an existing AnyInvocable instance.

Synopsis

Declared in <absl/functional/any_invocable.h>

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

Description

Upon assignment, *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.

Return Value

A reference to *this.

Parameters

NameDescription
fThe invocable object to assign.