Conversation
…zation + val<> compile-fail diagnostic - Add neg(p) negation pattern combinator (46 LOC, negation.hpp) - Lower k_variant_inline_dispatch_alt_threshold from 16 to 8 (optimize.hpp) - Add compile-fail test for val<>(runtime_value) misuse - Wire neg into patternia.hpp public API
4 tasks
sentomk
added a commit
that referenced
this pull request
May 4, 2026
…ation, user guides (#31) * feat: add neg(p) pattern combinator + variant inline threshold optimization + val<> compile-fail diagnostic (#29) - Add neg(p) negation pattern combinator (46 LOC, negation.hpp) - Lower k_variant_inline_dispatch_alt_threshold from 16 to 8 (optimize.hpp) - Add compile-fail test for val<>(runtime_value) misuse - Wire neg into patternia.hpp public API * docs: v0.9.3 release documentation — guides, release notes, performance note (#30) * docs: add performance tuning and common mistakes guides - docs/guide/performance-tuning.md: PTN_ON macro, val<> vs lit(), structural binding, variant dispatch - docs/guide/common-mistakes.md: 6 common mistakes with val<> runtime misuse, missing wildcard, lambda captures, etc. * docs: bump version to 0.9.3 + add neg(p) to API reference - CMakeLists.txt: VERSION 0.9.2 → 0.9.3 - README.md: GIT_TAG v0.9.2 → v0.9.3 - docs/api.md: add neg(p) section with example + namespace summary * docs(release): add v0.9.3 release note, update releases index, add neg example to README * docs(perf): add v0.9.3 performance note (variant dispatch threshold tuning) * docs(release): add performance section link to v0.9.3 release note * style: apply clang-format to PR changes --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
sentomk
added a commit
that referenced
this pull request
May 4, 2026
* release: v0.9.3 — neg(p) pattern combinator, variant dispatch optimization, user guides (#31) * feat: add neg(p) pattern combinator + variant inline threshold optimization + val<> compile-fail diagnostic (#29) - Add neg(p) negation pattern combinator (46 LOC, negation.hpp) - Lower k_variant_inline_dispatch_alt_threshold from 16 to 8 (optimize.hpp) - Add compile-fail test for val<>(runtime_value) misuse - Wire neg into patternia.hpp public API * docs: v0.9.3 release documentation — guides, release notes, performance note (#30) * docs: add performance tuning and common mistakes guides - docs/guide/performance-tuning.md: PTN_ON macro, val<> vs lit(), structural binding, variant dispatch - docs/guide/common-mistakes.md: 6 common mistakes with val<> runtime misuse, missing wildcard, lambda captures, etc. * docs: bump version to 0.9.3 + add neg(p) to API reference - CMakeLists.txt: VERSION 0.9.2 → 0.9.3 - README.md: GIT_TAG v0.9.2 → v0.9.3 - docs/api.md: add neg(p) section with example + namespace summary * docs(release): add v0.9.3 release note, update releases index, add neg example to README * docs(perf): add v0.9.3 performance note (variant dispatch threshold tuning) * docs(release): add performance section link to v0.9.3 release note * style: apply clang-format to PR changes --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * ci: update benchmark summary chart * hotfix(nav): add v0.9.3 to performance sidebar --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
Adds neg(p) negation pattern combinator, lowers variant inline dispatch threshold from 16 to 8, and adds a compile-fail diagnostic for val<> runtime value misuse.
Changes
include/ptn/pattern/negation.hppinclude/ptn/patternia.hppinclude/ptn/core/common/optimize.hppk_variant_inline_dispatch_alt_threshold16 → 8tests/tests_combinator.cpptests/CMakeLists.txttests/compile_fail/val_requires_compile_time_constant.cppTests
Risk
Low. neg(p) is a new combinator with zero binding — does not affect existing match paths. Threshold change 16→8 only affects variant dispatch strategy (hot inline path for ≤8 alternatives), existing paths unchanged.
Checklist
CONTRIBUTING.mdv0.9.3and passes required CI