The C++ Type System Is Your Friend
Offered By: ACCU Conference via YouTube
Course Description
Overview
Syllabus
Intro
Safe, performant, reusable code
(Mostly) typeless programming
Machine-typed programming
Type-rich programming
The miracle of compilation Runtime
Physical types
Whole Value pattern
Templates to the rescue
Adding checking of values
Reuse through client libraries
Physical quantities and dimensions
Tailoring operations - library code
Tailoring operations - client code
Templates and policies
Implementing policies • Let's use a policy on overflow
Constructor validation logic • Let's use a policy to enforce that quantities are non-negative
Effect of constructor validation logic . So, what about the generated code?
Starting to define a domain type . We have now restricted both the operations and the range of allowed values
Domain types vs primitives • Business rules still exist when using primitives: they are just distributed
Compile-time range calculation
Scaling and errors • As systems get larger the number of possible combinations of types (and therefore incompatibilities) grows even faster
Templates and "concepts lite"
Concepts code - first attempt
Taught by
ACCU Conference
Related Courses
Khronos Sycl Language Framework for C++ Accelerators - Take Advantage of All the MIPSACCU Conference via YouTube Space Invaders - The C++20 Spaceship Operator is Upon Us
ACCU Conference via YouTube Grinding, Farming, and Alliances - Become a Better Programmer by Using Words and Ideas From Casual Gaming
ACCU Conference via YouTube Designing for C++ Concurrency Using Message Passing
ACCU Conference via YouTube Productivity in C++ Game Development - Inside the Mind of an AAA Game Developer
ACCU Conference via YouTube