Safer and simpler C++ is the goal of many things I am doing. C++ has a rich and strong type system, except for the holes inherited from C. In this talk we will learn how to circumvent those holes and define useful types for stuff where otherwise we would have used plain ints, doubles, or strings. It demonstrates the simplest strong type mechanism of C++ that also works in C, but also a framework that was designed to make it even simpler to define strong types than what was proposed in P0109 as a language extension. We will also look at the perils of using size_t for capacity, indexing and size of containers and how strong types would have prevented some of their constructor usability issues. This leads to the duality of types used for a 1d vector space with a corresponding affine space that might share internal representation but not the corresponding operations, such as representing number of elements versus the distance between elements in an array.
You can take a look at the strong typing framework PSsst here:
https://github.com/PeterSommerlad/PSsst and the language proposal at
wg21.link/P0109