[func.wrap.ref.deduct]

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

## 22.10 Function objects [[function.objects]](function.objects#func.wrap.ref.deduct)

### 22.10.17 Polymorphic function wrappers [[func.wrap]](func.wrap#ref.deduct)

#### 22.10.17.6 Non-owning wrapper [[func.wrap.ref]](func.wrap.ref#deduct)

#### 22.10.17.6.5 Deduction guides [func.wrap.ref.deduct]

[ð](#itemdecl:1)

`template<class F>
  function_ref(F*) -> function_ref<F>;
`

[1](#1)

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

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

[ð](#itemdecl:2)

`template<auto f>
  function_ref(nontype_t<f>) -> function_ref<see below>;
`

[2](#2)

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

Let F be remove_pointer_t<decltype(f)>[.](#2.sentence-1)

[3](#3)

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

*Constraints*: is_function_v<F> is true[.](#3.sentence-1)

[4](#4)

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

*Remarks*: The deduced type is function_ref<F>[.](#4.sentence-1)

[ð](#itemdecl:3)

`template<auto f, class T>
  function_ref(nontype_t<f>, T&&) -> function_ref<see below>;
`

[5](#5)

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

Let F be decltype(f)[.](#5.sentence-1)

[6](#6)

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

*Constraints*: 

- [(6.1)](#6.1)

F is of the formR(G​::​*)(A...) cv &opt noexcept(E) for a type G, or

- [(6.2)](#6.2)

F is of the formM G​::​* for a type G and an object type M,
in which case
let R be invoke_result_t<F, T&>,A... be an empty pack, andE be false, or

- [(6.3)](#6.3)

F is of the formR(*)(G, A...) noexcept(E) for a type G[.](#6.sentence-1)

[7](#7)

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

*Remarks*: The deduced type is function_ref<R(A...) noexcept(E)>[.](#7.sentence-1)
