diff --git a/include/ConflictSet.h b/include/ConflictSet.h index a100e01..0b91d6a 100644 --- a/include/ConflictSet.h +++ b/include/ConflictSet.h @@ -132,6 +132,13 @@ struct __attribute__((__visibility__("default"))) ConflictSet { private: Impl *impl; +#if defined(__cplusplus) && __cplusplus <= 199711L + /* Declared private and left undefined to prevent copying in C++98/C++03. + The compiler would otherwise implicitly generate public copy operations, + which share the opaque Impl* and cause a double-free. */ + ConflictSet(const ConflictSet &); + ConflictSet &operator=(const ConflictSet &); +#endif }; } /* namespace weaselab */