Close two defeatable ReleaseProof guards and fix the static-lane skip's dead comparison

ReleaseProof{} and copy-reuse both compiled under this project's C++17;
user-provided ctor, deleted copy ctor and friend close them. The skip now
compares stored values, not norms, so it actually fires. Abort downgraded
to a debug assert.
This commit is contained in:
2026-08-02 20:20:48 -04:00
parent 056c60c8e1
commit de34fbafdb
4 changed files with 95 additions and 35 deletions
+7 -5
View File
@@ -70,11 +70,13 @@ struct LiveValues {
// The seqlock copies the block as raw bytes, which is only defensible for a plain value type.
static_assert(std::is_trivially_copyable_v<LiveValues>,
"the live block is copied under a seqlock — it must stay a plain value");
// Guards operator== against silent staleness: a member added to the struct above changes this
// size, so the assert fails at the new member's own commit instead of leaving a live control
// that never reaches a sounding voice with no compiler or test signal. Confirmed 352 bytes,
// MSVC 19.44 x64, Release (`SizeProbe<sizeof(LiveValues)>`, an incomplete-template size probe
// whose error message reports the value). Bump the literal AND operator== together.
// A SIZE-CHANGING edit only: padding can absorb a member added beside an existing one (a bool
// beside splineActive, a fifth FilterSettings float) without moving this literal at all, so this
// assert is NOT the guard against a forgotten operator== field —
// testEveryFieldOfLiveValuesIsCompared (test_live_params.cpp) is that guard, poisoning one leaf
// at a time. This assert only catches an edit that changes sizeof(LiveValues) itself. Confirmed
// 352 bytes, MSVC 19.44 x64, Release (`SizeProbe<sizeof(LiveValues)>`, an incomplete-template
// size probe whose error message reports the value). Bump the literal AND operator== together.
static_assert(sizeof(LiveValues) == 352,
"a member was added or removed — extend operator== in live_params.cpp to match");