absl::swap

swap()

Synopsis

Declared in <absl/functional/any_invocable.h>

void
swap(
    AnyInvocable& f1,
    AnyInvocable& f2) noexcept;

Description

Exchanges the targets of f1 and f2.

Parameters

NameDescription
f1The first AnyInvocable to swap.
f2The second AnyInvocable to swap.