| 49 | struct func_wrapper : func_wrapper_base { |
| 50 | using func_wrapper_base::func_wrapper_base; |
| 51 | Return operator()(Args... args) const { // NOLINT(performance-unnecessary-value-param) |
| 52 | gil_scoped_acquire acq; |
| 53 | // casts the returned object as a rvalue to the return type |
| 54 | return hfunc.f(std::forward<Args>(args)...).template cast<Return>(); |
| 55 | } |
| 56 | }; |
| 57 | |
| 58 | PYBIND11_NAMESPACE_END(type_caster_std_function_specializations) |