bsl::swap

Exchange the targets held by the specified a and b functions.

Synopsis

Declared in <bslstl_function.h>

template<class PROTOTYPE>
void
swap(
    function<PROTOTYPE>& a,
    function<PROTOTYPE>& b) noexcept;

Description

The behavior is undefined unless `a.get_allocator() == b.get_allocator()`.

Parameters

NameDescription
afirst function participating in the swap
bsecond function participating in the swap