[func.wrap.move.util]

# 22 General utilities library [[utilities]](./#utilities)

## 22.10 Function objects [[function.objects]](function.objects#func.wrap.move.util)

### 22.10.17 Polymorphic function wrappers [[func.wrap]](func.wrap#move.util)

#### 22.10.17.4 Move-only wrapper [[func.wrap.move]](func.wrap.move#util)

#### 22.10.17.4.5 Utility [func.wrap.move.util]

[ð](#lib:swap,move_only_function)

`void swap(move_only_function& other) noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L14451)

*Effects*: Exchanges the target objects of *this and other[.](#1.sentence-1)

[ð](#lib:swap,move_only_function_)

`friend void swap(move_only_function& f1, move_only_function& f2) noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L14462)

*Effects*: Equivalent to f1.swap(f2)[.](#2.sentence-1)

[ð](#lib:operator==,move_only_function)

`friend bool operator==(const move_only_function& f, nullptr_t) noexcept;
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L14473)

*Returns*: true if f has no target object, otherwise false[.](#3.sentence-1)
