CppCon 2018 has ended
View analytic
Friday, September 28 • 09:00 - 10:00
Class template argument deduction in C++17

Sign up or log in to save this to your schedule and see who's attending!

Class Template Argument Deduction (CTAD) is a very useful C++ language feature that was added in C++17. This talk is a comprehensive and practice-oriented introduction to this new technique.

In this talk I'll present how CATD and automatic deduction guides let you write cleaner and shorter code, show how to interact with it when using the C++ standard library and when designing your own classes, explain when and how user-defined deduction guides should be used, and cover the language rules behind all of this.

We will also discuss the various pitfalls that lie in wait: wrong and surprising template arguments being deduced, your constructor not being selected even if you think it should be, and automatic CTAD sometimes leading to unsafe and broken code – and how to circumnavigate those pitfalls.

avatar for Timur Doumler

Timur Doumler

Timur Doumler works at JetBrains, where he develops the C++ frontend for CLion, the cross-platform C++ IDE. In the past he has spent much time working in the audio tech industry and has written code for the JUCE framework. Timur is an active member of the ISO C++ committee and passionate... Read More →

Friday September 28, 2018 09:00 - 10:00
Steamboat (403)

Attendees (126)