Tag: constraints
3 posts
-
C++20 Concepts | Making Template Error Messages Readable
C++20 Concepts: clearer errors than SFINAE/enable_if—standard concepts, requires clauses, overloads, and practical C++20 examples.
-
TypeScript Generics: How Inference Picks T, When to Constrain, and Signs a Generic Is Unneeded
TypeScript generics explained through what they guarantee: how inference picks T, when a constraint is needed, why a type parameter used once is a smell, and how generic fetch helpers can lie.
-
C++20 Constraints in Practice: requires Expressions, Subsumption, and Overload Selection
How C++20 constraints actually behave: what a requires expression checks (syntax, not meaning), why only named concepts subsume each other, how constrained overloads are ranked, and the mistakes that make a concept accept the wrong types.