20 General utilities library [utilities]

20.9 Function objects [function.objects]

20.9.11 Polymorphic function wrappers [func.wrap]

20.9.11.2 Class template function [func.wrap.func]

20.9.11.2.2 function modifiers [func.wrap.func.mod]

void swap(function& other) noexcept;

Effects: interchanges the targets of *this and other.

template<class F, class A> void assign(F&& f, const A& a);

Effects: function(allocator_arg, a, std::forward<F>(f)).swap(*this)