In the second part of this Bits of Q tutorial on type deduction we discuss decltype, lambda captures and return type deduction. The tutorial references the rules for template and auto type deduction which were explained in part one. If you haven't seen part 1, I recommend watching it first.
Part 1: Template & auto type deduction:
https://youtu.be/flENkfue6Xc
-- TIMESTAMPS --
00:00 - Introduction & part 1 recap
00:48 - Part 2
01:08 - Example: Lambdas and type deduction
02:04 - Lambda capture deduction
04:24 - Lambda init-capture deduction
05:51 - Auto return type deduction
06:13 - decltype(auto) return type deduction
06:30 - decltype deduction
09:09 - auto vs decltype(auto) return type deduction
11:13 - Ways of finding out the deduced type
13:19 - Conclusion
Outro music by lesfm from pixabay.
If you have any questions or feedback, just leave a comment below.
See you next time!
Download
0 formats
No download links available.
C++ type deduction - Part 2: decltype, lambda captures and return type deduction | NatokHD