Tag: template
6 posts
-
C++20 Template Lambdas: []<typename T> Syntax, Concept Constraints and When They Beat auto
C++20 template lambdas: `[]<typename T>(T a, T b)`, concepts constraints, parameter packs, and when they beat generic `auto` lambdas.
-
C++ Class Templates: Out-of-Line Members, Partial Specialization, Alias Templates and CTAD
C++ class templates: Stack vector<int> vs duplicate IntStack classes, partial specialization, template aliases with using, CTAD, and production.
-
C++17 Fold Expressions: Unary and Binary Folds Instead of Recursive Templates
How C++17 fold expressions collapse a parameter pack into a single expression, with unary and binary forms and where they replace recursive templates.
-
Expression Templates in C++: Lazy Evaluation That Removes Temporaries in Vector and Matrix Math
Expression templates in C++: building lazily evaluated expression trees to eliminate temporaries in vector and matrix operations, with a small math library and benchmarks.
-
How C++ auto Deduces Types: References, const, Braced Init and decltype(auto)
How C++ auto deduces types: why it drops const and references, auto& vs auto&&, braced-init rules, vector<bool> proxies, decltype(auto) and real errors.
-
C++20 Concepts: Writing Readable Template Constraints with concept and requires
C++20 concepts and requires: the four constraint syntaxes, standard concepts, subsumption, real GCC/Clang errors and fixes, and migrating off enable_if.