January 2020
Intermediate to advanced
454 pages
11h 25m
English
In this recipe, we will learn about how type deduction works with decltype() and decltype(auto), and how to avoid the issues of referenceness with auto using decltype(auto) instead.
This recipe is important as auto has some strange behavior in how it handles references that decltype() addresses, providing C++ with a means to handle type deduction more predictably, especially when working with C++ templates.