Adding Pattern Types to the Type System
summary
Adds a compiler-backed notion of pattern types that flow from lowering from AST over HIR into the type system and into layout, implemented via a stdlib macro plus a trait with min/max and sub_one helpers so ranges unify into a canonical start/end representation (inclusive handled by subtracting one). It already reduces special-case layout hacks and preserves size optimizations but generic pattern types and diagnostics remain incomplete and require more work in const/generic handling.
AI-written summary · about
chapters (3)
related talks
01h 00mTemplate Metaprogramming: Type Traits (part 1 of 2)
59mTemplate Metaprogramming: Type Traits (part 2 of 2)
01h 37mExtending and Simplifying C++: Thoughts on Pattern Matching using `is` and `as`
55mThe Curiously Recurring Pattern of Coupled Types
53mProduct Types for C++2x
01h 03mDeducing this Patterns
36mThe language that isn't
19mType Theory for the Working Rustacean
