diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index ce05b6e4e6..e828f725dd 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -312,6 +312,10 @@ class cpp_function : public function { // along the way. class strdup_guard { public: + strdup_guard() = default; + strdup_guard(const strdup_guard &) = delete; + strdup_guard &operator=(const strdup_guard &) = delete; + ~strdup_guard() { for (auto *s : strings) { std::free(s);