Lines Matching refs:Args
37 template <typename Class, typename Ret, typename... Args>
38 struct remove_member_function_pointer<Ret (Class::*)(Args...)> {
39 using type = Ret(Args...);
42 template <typename Class, typename Ret, typename... Args>
43 struct remove_member_function_pointer<Ret (Class::*)(Args...) const> {
44 using type = Ret(Args...);
53 template <typename Ret, typename... Args>
54 auto bind_opaque_no_op() -> Ret (*)(void*, Args...) {
55 return [](void*, Args...) -> Ret {
62 template <typename F, typename Ret, typename... Args>
63 auto bind_opaque_function_object(const F&) -> Ret (*)(void*, Args...) {
64 return [](void* opaque, Args... args) -> Ret {
65 return std::invoke(*static_cast<F*>(opaque), std::forward<Args>(args)...);
69 template <auto MemberFunction, typename Class, typename Ret, typename... Args>
70 auto bind_member_function(Class* instance, Ret (*)(Args...) = nullptr) {
71 return [instance](Args... args) -> Ret {
72 return std::invoke(MemberFunction, instance, std::forward<Args>(args)...);
76 template <auto FreeFunction, typename Ret, typename... Args>
77 auto bind_free_function(Ret (*)(Args...) = nullptr) {
78 return [](Args... args) -> Ret { return std::invoke(FreeFunction, std::forward<Args>(args)...); };