Class Template Argument Deduction
History, How to Use it, and How to Enable it for Your Classes
In C++17, a new feature "Class Template Argument Deduction" (CTAD for short) was added to the language.
In this talk, I will show the rationale for this feature, how you can use it in your code, explain how it works and give examples of how to enable it for your classes.
I'll answer questions like:
* Why did the committee add this feature to the language?
* Why "class template argument deduction"? Why not just "template argument deduction"?
* What is a deduction guide?
* What can be done in a deduction guide?
* How do I write my own deduction guides?
* What tools are there for debugging deduction guides?
I will also talk about enhancements since C++17, and possible future directions.
Marshall Clow
Marshall has been coding for 40+ years; he was the lead developer on libc++ for 10 years, and the chairman of the Library working group of the C++ standards committee for 5 years. These days, he spends his time looking at "interesting problems"