Strict weak revisited (just the fix)#188
Merged
WerWolv merged 20 commits intoJul 31, 2025
Merged
Conversation
WerWolv
approved these changes
Jul 31, 2025
1 task
lawm
pushed a commit
to lawm/PatternLanguage
that referenced
this pull request
Mar 13, 2026
…v#188) * Not working. Committed before I stuff shit up further. * Undo lunacy * Note to self * This is actually starting to find issues * Fix sort bug (ImHex, not checker) * Move variant type index code into header * DRY * Tidy up * Make sort checks optional * tidy up * Put checks in other container types * Disable sort checks * Make enable macro cover more code * Remove namespace qual * disable sort checks * Add static_assert. Fiddle around * Remove sort check code * Remove formatting change * Adjust codeing style * More style changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Some time ago I fixed a crash related to sorting in the pattern drawer. The cause was a sort predicate that did not implement strict weak ordering correctly. I have revisited this and found (and fixed) another violation (transitivity of incomparability).
This version of the PR contains just the fix.
The issue is here.
A version with the sort checking code can be found here. See this version for a more detailed description.