Skip to content

Patternia v0.7.0 Release Note

Release Date: February 5, 2026
Version: 0.7.0


Overview

Patternia v0.7.0 focuses on variant matching and diagnostics. This release unifies the type-pattern implementation (is / $ / alt), improves variant alternative lookup, and tightens compile-time validation with clearer error messages. Documentation is updated to reflect the refined variant API and binding/guard semantics.


Highlights

Variant Matching

  • Unified type-pattern implementation around is<T>(), alt<I>(), and explicit binding via $(is<T>()).
  • Added alt<I>() for index-based variant matching.
  • Improved variant alternative lookup using a meta type list.
  • Explicit binding of the selected alternative is expressed through $() rather than a separate as<T>() surface.

Guards and Bindings

  • Type patterns that bind can participate in guards.
  • Binding/guard behavior and documentation clarified to keep semantics explicit.

Diagnostics and Validation

  • Centralized and shortened static-assert diagnostics for clearer compiler output.
  • Wildcard (_) unreachable-case detection and validation improved.
  • Structural has<> members are validated at match-time for accessibility.

API Changes

Legacy Compact Case-Pack Restrictions

The removed compact case-pack form enforced non-binding patterns only, with explicit diagnostics. For binding and guard logic, use the pipeline form with explicit binding patterns.


Documentation Updates

  • Variant matching documentation reorganized and expanded.
  • Fallback semantics clarified around the final _ case.
  • Binding and guard behavior for variant alternatives documented more clearly.
  • Navigation and link consistency fixes across docs.

Compatibility Notes

  • If you relied on the removed compact case-pack form with bindings or guards, migrate to the pipeline form.
  • If you used duplicate types in std::variant, prefer alt<I>() for unambiguous matching.

Implementation Notes (Selected)

  • Type-patterns now share a common internal skeleton for consistency.
  • Static-assert messages are shorter and more uniform across modules.
  • Variant alternative indexing now uses meta utilities (index_t) for stronger compile-time reasoning.

Historical Note

The original v0.7.0 note used earlier namespace-qualified variant pattern names. Current code should use is<T>(), $(is<T>()), and alt<I>().