Generics & concepts
Reusable code with static requirements.
Generic parameters
Sn uses angle-bracket parameter lists for generic types and functions. Value parameters use const N: Type.
Concepts
Concepts express compile-time structural requirements. Generic constraints use where T: Concept clauses. The intended model checks a generic body before materializing reachable concrete instances.
Static by default
Concepts do not introduce runtime identity, vtables, witness dictionaries, or reflection lookup. Dynamic dispatch is reserved for explicit virtual or interface call boundaries.
Bounded resolution
The design excludes speculative candidate search, SFINAE, and argument-dependent lookup. Only documented requirement forms are admitted; arbitrary compile-time predicates are not automatically supported.
Practical use
Inspect the public signatures of Vector, iterators, and allocator APIs for concrete generic requirements. Availability and exact constraint spellings depend on the selected documentation and toolchain version.