[func.invoke]

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

## 22.10 Function objects [[function.objects]](function.objects#func.invoke)

### 22.10.5 invoke functions [func.invoke]

[ð](#lib:invoke)

`template<class F, class... Args>
  constexpr invoke_result_t<F, Args...> invoke(F&& f, Args&&... args)
    noexcept(is_nothrow_invocable_v<F, Args...>);
`

[1](#1)

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

*Constraints*: is_invocable_v<F, Args...> is true[.](#1.sentence-1)

[2](#2)

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

*Returns*: *INVOKE*(std​::​forward<F>(f), std​::​forward<Args>(args)...) ([[func.require]](func.require "22.10.4 Requirements"))[.](#2.sentence-1)

[ð](#lib:invoke_r)

`template<class R, class F, class... Args>
  constexpr R invoke_r(F&& f, Args&&... args)
    noexcept(is_nothrow_invocable_r_v<R, F, Args...>);
`

[3](#3)

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

*Constraints*: is_invocable_r_v<R, F, Args...> is true[.](#3.sentence-1)

[4](#4)

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

*Returns*: *INVOKE*<R>(std​::​forward<F>(f), std​::​forward<Args>(args)...) ([[func.require]](func.require "22.10.4 Requirements"))[.](#4.sentence-1)
