v0.7.0
Patternia v0.7.0 Release Note
Date: February 5, 2026
What's Changed
Variant Matching
Patternia now supports std::variant matching with a unified type-pattern system.
New/Updated APIs:
type::is<T>— type matchtype::as<T>— type match + bindingtype::alt<I>— index-based match (supports duplicated types)
Example:
auto r = match(v)
.when(type::is<int>() >> "int")
.when(type::as<std::string>() >> [](const std::string &s) { return s; })
.when(__ >> "other")
.end();Guards on Binding Type Patterns
Type patterns that bind can now participate in guards:
.when(type::as<std::string>()[ _ != "" ] >> [](const std::string &s) { ... })Diagnostics Improvements
- Shorter, clearer
static_assertmessages - Consistent diagnostic prefixes
- Structural
has<>members validated at match-time
Documentation Updates
- Variant matching docs expanded
- Binding/guard semantics clarified
- Navigation link fixes
Full release notes: v0.7.0.md