Summary
In this chapter, we learned about interfaces, inheritance, and polymorphism, which extended our skills of what we can do with our types. We had our first adventure into generic programming with C++ templates and touched on what the language gives us for free from the C++ Standard Library, which includes the STL. We explored a feature of C++ that just works, that is, template type deduction, which makes our life easier when using templates. We then went further with templates and learned how to control the parts of the template that are included by the compiler using SFINAE and if constexpr. These form the building blocks for our journey into C++. In the next chapter, we will revisit the stack and the heap, and understand what an exception is, what happens, and when it occurs. We'll also learn how to protect our programs from resource losses when exceptions occur.