|
libstdc++
|
Public Member Functions | |
| template<typename _Fn > | |
| requires is_function_v< _Fn > &&__is_invocable_using< _Fn * > | function_ref (_Fn *__fn) noexcept |
| template<auto __fn> | |
| requires __is_invocable_using< const decltype(__fn)& > constexpr | function_ref (nontype_t< __fn >) noexcept |
| _Td _GLIBCXX_MOF_CV &constexpr | function_ref (nontype_t< __fn >, _Up &&__ref) noexcept |
| template<auto __fn, typename _Td > | |
| requires __is_invocable_using< const decltype(__fn)&, _Td _GLIBCXX_MOF_CV * > constexpr | function_ref (nontype_t< __fn >, _Td _GLIBCXX_MOF_CV *__ptr) noexcept |
| _Res | operator() (_ArgTypes... __args) const noexcept(_Noex) |
| template<typename _Fn , typename _Vt = remove_reference_t<_Fn>> | |
| requires (!is_same_v< remove_cv_t< _Vt >, function_ref >) &&(!is_member_pointer_v< _Vt >) &&(!is_function_v< _Vt >) &&__is_invocable_using< _Vt _GLIBCXX_MOF_CV &> const expr function_ref(_Fn &&__f) noexcept | |
| template<auto __fn, typename _Up , typename _Td = remove_reference_t<_Up>> | |
| requires (!is_rvalue_reference_v< _Up &&>) &&__is_invocable_using< const decltype(__fn) & | |
| template<typename _Tp > | |
| requires (!is_same_v< _Tp, function_ref >) &&(!is_pointer_v< _Tp >) &&(!__is_nontype_v< _Tp >) function_ref &operator | |
Non-owning polymorphic function wrapper.
The std::function_ref class template is a non-owning call wrapper, that refers to a bound object. Using function_ref outside of the lifetime of the bound object has undefined behavior.
It supports const-qualification and no-throw guarantees. The qualifications and exception-specification of the signature are respected when invoking the reference function.
Definition at line 68 of file funcref_impl.h.
|
inlinenoexcept |
Target and bound object is function pointed by parameter.
Definition at line 89 of file funcref_impl.h.
|
inlinenoexcept |
Target object is __fn. There is no bound object.
Definition at line 132 of file funcref_impl.h.
References std::same_as.
|
inlinenoexcept |
Target object is equivalent to std::bind_front<_fn>(__ptr). Bound object is object pointed by second parameter (if any).
Definition at line 168 of file funcref_impl.h.
|
inlinenoexcept |
Invoke the target object.
The bound object will be invoked using the supplied arguments, and as const or non-const, as dictated by the template arguments of the function_ref specialization.
Definition at line 192 of file funcref_impl.h.
|
inlinenoexcept |
Target and bound object is object referenced by parameter.
Definition at line 98 of file funcref_impl.h.
| std::function_ref< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::requires | ( | !is_rvalue_reference_v< _Up &&> | ) | const & |
Target object is equivalent to std::bind_front<_fn>(std::ref(__ref)). Bound object is object referenced by second parameter.