deduction guides for std::function_ref
 
 
 From cppreference.com
 
 
 < cpp | utility | functional | function ref 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Utilities library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
  
 
 
 Type support (basic types, RTTI)
 Library feature-test macros (C++20)
(C++11)
(C++20)
(C++26)
(C++20)
 Coroutine support (C++20)
 Contract support (C++26)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
  (C++20)(C++20)(C++20)
  (C++20)(C++20)(C++20)
 General utilities
 Relational operators (deprecated in C++20)
(C++20)(C++20)(C++20)
  (C++20)(C++20)(C++20)
(C++20)
 Swap and type operations 
 Common vocabulary types
Function objects 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
(C++11)
(C++23)
(C++26)
(C++26)
(C++11)
(C++11)
(C++20)(C++23)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)
(C++20)(C++20)
(C++14)
(C++14)
(C++14)
(C++14)  
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++17)
(C++17)
(C++17)
(C++17)    
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)  
(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
(until C++17*)(until C++17*)
(until C++17*)(until C++17*)
(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
Defined in header 
 
 
<functional> 
 template< class F >
function_ref( F* ) -> function_ref<F>;
 (1) 
 (since C++26) 
function_ref( F* ) -> function_ref<F>;
template< auto f >
function_ref( std::nontype_t <f> ) -> function_ref</*see below*/>;
 (2) 
 (since C++26) 
function_ref( std::nontype_t <f> ) -> function_ref</*see below*/>;
template< auto f, class T >
function_ref( std::nontype_t <f>, T&& ) -> function_ref</*see below*/>;
 (3) 
 (since C++26) 
function_ref( std::nontype_t <f>, T&& ) -> function_ref</*see below*/>;
2) 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>.
3) Let type F be decltype(f). This overload participates in overload resolution only if :
- F is of the form R(G::*)(A...) noexcept(E) (optionally cv-qualified, optionally noexcept, optionally lvalue reference qualified) for a type G, or
- F is of the form M G::* for a type G and an object type M, in which case let R be std::invoke_result_t <F, T&>, A... be an empty pack, and E be false, or
- F is of the form R(*)(G, A...) noexcept(E) for a type G.
- The deduced type is std::function_ref <R(A...) noexcept(E)>.
 
[edit] Example
 This section is incomplete
Reason: no example
Reason: no example