20 General utilities library [utilities]

20.14 Function objects [function.objects]

20.14.17 Polymorphic function wrappers [func.wrap] Move only wrapper [func.wrap.move] Utility [func.wrap.move.util]

void swap(move_only_function& other) noexcept;
Effects: Exchanges the target objects of *this and other.
friend void swap(move_only_function& f1, move_only_function& f2) noexcept;
Effects: Equivalent to f1.swap(f2).
friend bool operator==(const move_only_function& f, nullptr_t) noexcept;
Returns: true if f has no target object, otherwise false.