Strong types are such a powerful tool for bringing expressiveness into code. By using them we can precisely state our intentions about our C++ objects, both to compilers and to human beings reading our code.
This topic has been popular for years in the C++ community, notably with an implementation in Boost (strong typedef), and proposals for standards. Actually, std::chrono already intensively uses strong typing.
In this talk, you will see what strong types are, how they can make your code clearer, and whether or not you will incur a performance cost in your code by using them. We will see various usages of strong types, including units and named parameters. This will be based on a simple implementation of generic strong typing that I am proposing and that was already presented to many people.
But I want to take this topic further, by also showing practical aspects of strong types that do come up in real code, which includes:
Passing strong types by reference,
Strong typing over generic types, or otherwise unknown types like lambdas,
Inheriting functionalities from the underlying type,
Converting strong types to one another.
Watch video Strong types for strong interfaces - Jonathan Boccara - Meeting C++ 2017 online without registration, duration hours minute second in high quality. This video was added by user Meeting Cpp 23 January 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,41 once and liked it 7 people.