Disallow copying ConflictSet in C++98/C++03 #51

Merged
andrew merged 2 commits from weaselbot/conflict-set:weaselbot/issue-48 into main 2026-06-22 23:45:01 +00:00
Member

Closes #48

Closes #48
weaselbot marked the pull request as ready for review 2026-06-21 16:42:37 +00:00
andrew force-pushed weaselbot/issue-48 from 0faedfc09e to ea6d97c881 2026-06-21 23:29:10 +00:00 Compare
weaselbot force-pushed weaselbot/issue-48 from 6d876cfde1 to 5013669629 2026-06-22 03:13:53 +00:00 Compare
weaselbot force-pushed weaselbot/issue-48 from 5013669629 to becbbcbc28 2026-06-22 06:45:57 +00:00 Compare
weaselbot added 1 commit 2026-06-22 17:45:58 +00:00
Make ConflictSet non-copyable in C++98/C++03
CI / release (arm64, ubuntu-latest-arm64) (pull_request) Successful in 3m20s
CI / pre-commit (pull_request) Successful in 2m5s
CI / test (-DCMAKE_BUILD_TYPE=Debug, debug) (pull_request) Successful in 3m37s
CI / test (-DCMAKE_CXX_FLAGS=-DUSE_64_BIT=1, 64-bit-versions) (pull_request) Successful in 3m27s
CI / test (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc) (pull_request) Successful in 3m37s
CI / test (-DUSE_SIMD_FALLBACK=ON, simd-fallback) (pull_request) Successful in 3m27s
CI / release (amd64, ubuntu-latest-amd64) (pull_request) Successful in 4m52s
CI / coverage (pull_request) Successful in 3m37s
7eaac2a184
`ConflictSet(const ConflictSet&)` and `operator=(const ConflictSet&)` were
only deleted for C++11 and later. In C++98/C++03 the compiler implicitly
generated public copy operations, so copying a ConflictSet shared the opaque
`Impl*` and caused a double-free on destruction.

Declare both operations private and leave them undefined when
`__cplusplus <= 199711L`, matching the standard pre-C++11 idiom for
move-only types. Guard the declarations with `defined(__cplusplus)` so
they are not exposed to C90 compilation units.

Closes #48
weaselbot force-pushed weaselbot/issue-48 from 1ea909217d to c80cfedf58 2026-06-22 17:45:58 +00:00 Compare
andrew force-pushed weaselbot/issue-48 from c80cfedf58 to 7eaac2a184 2026-06-22 18:17:19 +00:00 Compare
andrew added 1 commit 2026-06-22 18:19:00 +00:00
We already know __cplusplus is defined
CI / release (arm64, ubuntu-latest-arm64) (pull_request) Successful in 3m21s
CI / pre-commit (pull_request) Successful in 2m6s
CI / test (-DCMAKE_BUILD_TYPE=Debug, debug) (pull_request) Successful in 3m35s
CI / test (-DCMAKE_CXX_FLAGS=-DUSE_64_BIT=1, 64-bit-versions) (pull_request) Successful in 3m27s
CI / test (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc) (pull_request) Successful in 3m39s
CI / test (-DUSE_SIMD_FALLBACK=ON, simd-fallback) (pull_request) Successful in 3m34s
CI / release (amd64, ubuntu-latest-amd64) (pull_request) Successful in 4m53s
CI / coverage (pull_request) Successful in 3m36s
ccd637deab
andrew merged commit b9b2d69dd5 into main 2026-06-22 23:45:01 +00:00
andrew deleted branch weaselbot/issue-48 2026-06-22 23:45:03 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weaselab/conflict-set#51