C++ type deduction - Part 1: Template and auto type deduction
In this Bits of Q tutorial we talk about type deduction and why it is getting ever more important in modern C++. This video is part of a two part mini-series where we explain everything you need to know about this topic. In the first part we discuss template and auto type deduction. This also covers the rules for deduction of forwarding references. If you are not familiar with lvalues and rvalues, I recommend first watching my tutorial on move semantics: https://youtu.be/5xn0v7R32eU For some background information on forwarding references and what problem they were designed to solve, check out my video on Perfect Forwarding: https://youtu.be/c5dQX6GV_4g -- TIMESTAMPS -- 00:00 - Introduction 00:30 - Example 04:09 - Where is type deduction used 05:16 - Template type deduction 06:43 - Accepting by value 09:15 - Accepting by reference/pointer 10:11 - Accepting by forwarding reference 12:02 - Auto type deduction 12:59 - Summarizing the rules Outro music by lesfm from pixabay. If you have any questions or feedback, just leave a comment below. See you next time!
Download
0 formatsNo download links available.