Merge pull request 'Disallow copying ConflictSet in C++98/C++03' (#51) from weaselbot/conflict-set:weaselbot/issue-48 into main
CI / pre-commit (push) Successful in 2m8s
CI / release (arm64, ubuntu-latest-arm64) (push) Successful in 3m34s
CI / test (-DCMAKE_BUILD_TYPE=Debug, debug) (push) Successful in 3m38s
CI / test (-DCMAKE_CXX_FLAGS=-DUSE_64_BIT=1, 64-bit-versions) (push) Successful in 3m28s
CI / test (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc) (push) Successful in 3m37s
CI / test (-DUSE_SIMD_FALLBACK=ON, simd-fallback) (push) Successful in 3m29s
CI / release (amd64, ubuntu-latest-amd64) (push) Successful in 4m57s
CI / coverage (push) Successful in 3m42s

Reviewed-on: #51
This commit was merged in pull request #51.
This commit is contained in:
2026-06-22 23:44:59 +00:00
+7
View File
@@ -132,6 +132,13 @@ struct __attribute__((__visibility__("default"))) ConflictSet {
private: private:
Impl *impl; Impl *impl;
#if __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 */ } /* namespace weaselab */