2.2 KiB
[func.wrap.ref.deduct]
22 General utilities library [utilities]
22.10 Function objects [function.objects]
22.10.17 Polymorphic function wrappers [func.wrap]
22.10.17.6 Non-owning wrapper [func.wrap.ref]
22.10.17.6.5 Deduction guides [func.wrap.ref.deduct]
template<class F> function_ref(F*) -> function_ref<F>;
Constraints: is_function_v is true.
template<auto f> function_ref(nontype_t<f>) -> function_ref<see below>;
Let F be remove_pointer_t<decltype(f)>.
Constraints: is_function_v is true.
Remarks: The deduced type is function_ref.
template<auto f, class T> function_ref(nontype_t<f>, T&&) -> function_ref<see below>;
Let F be decltype(f).
Constraints:
F is of the formR(G::*)(A...) cv &opt noexcept(E) for a type G, or
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
F is of the formR(*)(G, A...) noexcept(E) for a type G.
Remarks: The deduced type is function_ref<R(A...) noexcept(E)>.