Go to the documentation of this file.
46 #ifndef ABSL_FUNCTIONAL_FUNCTION_REF_H_
47 #define ABSL_FUNCTIONAL_FUNCTION_REF_H_
51 #include <type_traits>
53 #include "absl/base/attributes.h"
54 #include "absl/functional/internal/function_ref.h"
55 #include "absl/meta/type_traits.h"
89 template <
typename R,
typename...
Args>
102 template <
typename F,
typename = EnableIfCompatible<const F&>>
117 typename F,
typename = EnableIfCompatible<F*>,
121 assert(f !=
nullptr);
122 ptr_.fun =
reinterpret_cast<decltype(
ptr_.fun)
>(f);
132 return invoker_(
ptr_, std::forward<Args>(
args)...);
143 #endif // ABSL_FUNCTIONAL_FUNCTION_REF_H_
#define ABSL_NAMESPACE_END
FunctionRef(const F &f ABSL_ATTRIBUTE_LIFETIME_BOUND)
R operator()(Args... args) const
typename ::std::enable_if< C, int >::type EnableIf
#define ABSL_NAMESPACE_BEGIN
absl::functional_internal::VoidPtr ptr_
R InvokeFunction(VoidPtr ptr, typename ForwardT< Args >::type... args)
typename std::enable_if< std::is_void< R >::value||std::is_convertible< FR, R >::value >::type EnableIfCompatible
R InvokeObject(VoidPtr ptr, typename ForwardT< Args >::type... args)
void AssertNonNull(const std::function< Sig > &f)
R(*)(VoidPtr, typename ForwardT< Args >::type...) Invoker
absl::functional_internal::Invoker< R, Args... > invoker_
#define ABSL_ATTRIBUTE_LIFETIME_BOUND
decltype(Invoker< F, Args... >::type::Invoke(std::declval< F >(), std::declval< Args >()...)) invoke_result_t
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:22