mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 14:59:27 +00:00
```c++
m.def("foo", foo, py::call_guard<T>());
```
is equivalent to:
```c++
m.def("foo", [](args...) {
T scope_guard;
return foo(args...); // forwarded arguments
});
```
3.0 KiB
3.0 KiB