MCPcopy Create free account
hub / github.com/pybind/pybind11 / scope_exit

Method scope_exit

tests/test_with_catch/test_interpreter.cpp:426–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424struct scope_exit {
425 std::function<void()> f_;
426 explicit scope_exit(std::function<void()> f) noexcept : f_(std::move(f)) {}
427 ~scope_exit() {
428 if (f_) {
429 f_();

Callers

nothing calls this directly

Calls 1

moveFunction · 0.85

Tested by

no test coverage detected