|
libstdc++
|
Public Member Functions | |
| template<typename _Fn > | |
| requires is_function_v< _Fn > &&__is_invocable_using< _Fn * > | function_ref (_Fn *__fn) noexcept |
| template<auto __fn, typename _Fn > | |
| requires constexpr __is_invocable_using< const _Fn & > | function_ref (constant_wrapper< __fn, _Fn >) noexcept |
| template<auto __fn, typename _Fn , typename _Td > | |
| requires constexpr __is_invocable_using< const _Fn &, _Td _GLIBCXX_MOF_CV * > | function_ref (constant_wrapper< __fn, _Fn >, _Td _GLIBCXX_MOF_CV *__ptr) noexcept |
| _Td _GLIBCXX_MOF_CV &constexpr | function_ref (constant_wrapper< __fn, _Fn >, _Up &&__ref) noexcept |
| _Res | operator() (_ArgTypes... __args) const noexcept(_Noex) |
| template<auto __fn, typename _Fn , typename _Up , typename _Td = remove_reference_t<_Up>> | |
| requires (!is_rvalue_reference_v< _Up && >) &&__is_invocable_using< const _Fn & | |
| template<typename _Tp > | |
| requires (!is_same_v< _Tp, function_ref >) &&(!is_pointer_v< _Tp >) &&(!__is_constant_wrapper_v< _Tp >) function_ref &operator | |
| 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 | |
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.
|
inlineconstexprnoexcept |
Target object is __fn. There is no bound object.
Definition at line 132 of file funcref_impl.h.
References std::__invoke(), and std::requires.
|
inlineconstexprnoexcept |
Target object is equivalent to std::bind_front<_fn>(__ptr). Bound object is object pointed by second parameter (if any).
Definition at line 174 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 197 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.
References std::same_as.
|
inlinenoexcept |
Target and bound object is object referenced by parameter.
Definition at line 98 of file funcref_impl.h.