On this page
deduction guides for std::function_ref
Defined in header <functional> |
||
---|---|---|
|
(1) | (since C++26) |
|
(2) | (since C++26) |
|
(3) | (since C++26) |
2) Let type
3) Let type F
be std::remove_pointer_t<decltype(f)>
. This overload participates in overload resolution only if std::is_function_v<F>
is true
. The deduced type is std::function_ref<F>
.
F
be decltype(f)
. This overload participates in overload resolution only if :
F
is of the formR(G::*)(A...) noexcept(E)
(optionally cv-qualified, optionally noexcept, optionally lvalue reference qualified) for a typeG
, orF
is of the formM G::*
for a typeG
and an object typeM
, in which case letR
bestd::invoke_result_t<F, T&>
,A...
be an empty pack, andE
be false, orF
is of the formR(*)(G, A...) noexcept(E)
for a typeG
.
std::function_ref<R(A...) noexcept(E)>
.
Example
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/utility/functional/function_ref/deduction_guides