
This video provides an overview of the entire course.
Understand what a “variant” is and its usefulness.
Learn about the basic interface of the new C++17 std::variant class.
Understand what “visitation” is and how it can be applied to variants.
Learn about realistic use case scenarios where std::variant can be used effectively.
Section recap.
Understand why std::visit is not optimal and what pattern matching is.
Write a generic class that creates an overload set from scratch.
Understand what “visitation” is and how it can be applied to variants.
Section recap.
Learn about the concept of “optional value” and why it is useful
Get familiar with the interface provided by std::optional.
Understand realistic use cases for optional, by looking at example function interfaces and data structure definitions
Learn about the idea of an “owning wrapper” by understanding how `std::string` works internally and what its semantics are.
Learn about `std::string_view`, introduced in C++17.
Learn about the most important member functions and operations provided with `std::string_view`.
Understand when and why to use `std::string_view` as part of function interfaces, and the performance benefits it brings.
Find a pattern similar to `std::string`/`std::string_view` in other classes, and understand the importance of having both owning/non-owning wrappers.
In this course we’ll learn how to write correct, safe, and performant code by making use of C++’s type system. Firstly, we’ll learn about the Standard Library’s “algebraic data types” and how they can increase safety, performance, and readability of your application/library. We’ll then look at function interfaces. As an example, writing a function that takes a string in such a way that it performs optimally with both std::string and const char* seems like a daunting task. It gets even more tricky with functions taking other functions as input. Is it possible to generalize these issues and provide the “perfect” interface?
About the Author :
Vittorio Romeo is a Software Engineer at Bloomberg LP. He completed his Bachelor's degree in Computer Science at "Università degli Studi di Messina".
He began programming at a very young age and is now a C++ enthusiast. While following the evolution of the C++ standard and embracing the newest features, he worked on several open-source projects, including modern general-purpose libraries and free cross-platform games.
Vittorio is an active member of the C++ community: he participated as a speaker at CppCon 2014/2015/2016, ++it Florence 2015 and at his local Linux Day 2013/2014 events, as a Student/Volunteer at C++Now 2015/2016, at Meeting C++ 2015/2016.
He currently maintains a C++-related blog and a YouTube channel featuring well-received modern C++11 and C++14 tutorials.
When he's not writing code, Vittorio enjoys weightlifting and fitness-related activities, competitive/challenging computer gaming and good sci-fi movies/TV-series.