Overview
Explore a comprehensive conference talk on leveraging the C++ type system and templates to create efficient, safe, and reusable code. Learn how to utilize type-rich APIs for error prevention and improved readability, while implementing template techniques for zero-overhead reusable libraries. Dive into topics such as the Whole Value Pattern, constructors, explicit operations, runtime polymorphism, physical quantities, template metaprogramming, operator traits, and fixed-length strings. Discover the benefits of policy decisions, context-dependent runtime checks, and the differences between implicit and explicit operations. Gain insights into compilation versus templates, and understand how concepts can improve error messages. Master the art of creating lightweight abstractions that enhance code safety, genericity, and reusability in C++ programming.
Syllabus
Intro
Why this talk
Three important things
History of programming types
Types in C
Using the Type System
Compilation
Example
Whole Value Pattern
Templates
Header Files
Constructors
Explicit Operations
CRTP
C Runtime Polymorphism
Physical Quantities
Related Flavors
Template Metaprogramming
Operator Traits
Fixed Length String
Policy Decisions
Context Per
Runtime Check
Implicit vs Explicit
Compilation vs Templates
First attempt
Error messages without concepts
Error messages with concepts
Summary
Taught by
NDC Conferences