In this recipe, we will learn how to help the compiler with class template type deduction using user-defined deduction guides. Most of the time, user-defined deduction guides are not needed, but in some cases, they might be to ensure the compiler deduces the proper types. This recipe is important because, without user-defined type deduction, certain types of template schemes are simply not possible, as will be shown.
Working with user-defined type deduction in C++17
Getting ready
Before beginning, please ensure that all of the technical requirements are met, including installing Ubuntu 18.04 or higher and running the following in a Terminal window:
> sudo apt-get install build-essential git cmake
This will ensure that your...