feat(guard): unify placeholder syntax - #43
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Problem - Guard syntax exposed positional and macro-based alternatives. - The wildcard had a redundant double-underscore alias. Implementation - Reuse `_` for single-value guards and wildcard fallback. - Keep `arg_t<N>` internal and expose names through PTN_BIND. - Remove `__`, `_0`, `arg<N>`, PTN_LET, and PTN_WHERE. - Migrate tests, samples, benchmarks, diagnostics, and docs. Tests - Cover both `_` roles, all guard operators, and removed APIs. - Verify PTN_BIND at namespace and block scope. - Build and test with GCC and Clang in C++17 mode.
sentomk
force-pushed
the
feat/guard-placeholders
branch
from
July 31, 2026 14:15
3ec64e6 to
9b62e32
Compare
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
Unify Patternia's guard placeholder surface around
_for a single bound value andPTN_BINDnames for multiple values. This is a breaking cleanup: the redundant wildcard alias and positional/macro guard alternatives are removed instead of retained as compatibility aliases.Changes
_serve as both wildcard fallback and the index-zero guard expressionarg_t<N>primitive into a lightweight placeholder headerPTN_BINDdeclarations at both namespace and block scope__,_0, publicarg<N>,PTN_LET, andPTN_WHERETesting
git diff --checkpassed