diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index ce05b6e4e..e828f725d 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -312,6 +312,10 @@ protected: // 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);