1
0
mirror of https://github.com/pybind/pybind11.git synced 2025-03-02 06:42:45 +00:00
Commit Graph

1 Commits

Author SHA1 Message Date
Dean Moldovan
1ac19036d6 Add a scope guard call policy
```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
});
```
2017-04-03 00:52:47 +02:00