T.concepts: Concept rules
Concepts is a facility for specifying requirements for template arguments. It is an ISO technical specification, but not yet supported by currently shipping compilers. Concepts are, however, crucial in the thinking about generic programming and the basis of much work on future C++ libraries (standard and other).
Concept use rule summary:
- T.10: Specify concepts for all template arguments
- T.11: Whenever possible use standard concepts
- T.12: Prefer concept names over
auto
- T.13: Prefer the shorthand notation for simple, single-type argument concepts
- ???
Concept definition rule summary:
- T.20: Avoid "concepts" without meaningful semantics
- T.21: Define concepts to define complete sets of operations
- T.22: Specify axioms for concepts
- T.23: Differentiate a refined concept from its more general case by adding new use patterns
- T.24: Use tag classes or traits to differentiate concepts that differ only in semantics
- T.25: Avoid negating constraints
- T.26: Prefer to define concepts in terms of use-patterns rather than simple syntax
- ???