filmov
tv
CppCon 2018: Timur Doumler “Class template argument deduction in C++17”
Показать описание
—
—
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.
—
Timur Doumler, JetBrains
—
*-----*
*-----*
—
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.
—
Timur Doumler, JetBrains
—
*-----*
*-----*
CppCon 2018: Timur Doumler “Can I has grammar?”
CppCon 2018: Timur Doumler & Dmitry Kozhevnikov “Parsing C++”
CppCon 2018: Timur Doumler “Class template argument deduction in C++17”
CppCon 2016: Timur Doumler “Want fast C++? Know your hardware!'
CppCon 2016: Timur Doumler “Readable C++'
ISO/IEC 14882 - Timur Doumler - CppCon 2019
Real-time Programming with the C++ Standard Library - Timur Doumler - CppCon 2021
C++20 breaks stuff - Timur Doumler - Meeting C++ 2018 Lightning Talks
CppCon 2015: Timur Doumler “C++ in the Audio Industry”
Initialization in modern C++ - Timur Doumler - Meeting C++ 2018
C++Now 2019: Timur Doumler “Better CTAD for C++20”
C++ Lambda Idioms - Timur Doumler - CppCon 2022
Talks and Highlights From CppCon 2018!
How C++23 Changes the Way We Write Code - Timur Doumler - CppCon 2022
CppCon 2018: Alisdair Meredith “Contract Programming in C++(20) (part 1 of 2)”
CppCon 2019: Timur Doumler “C++20: The small things”
CppCon 2018: “Grill the Committee”
CppCon 2018: Phil Nash “You're Not as Smart as You Think You Are”
CppCon 2018: Nicolai Josuttis “The Nightmare of Initialization in C++”
CppCon 2018: Richard Powell “How to Argue(ment)'
CppCon 2018: James McNellis “The Shape of a Program”
CppCon 2018: Borislav Stanimirov “The Bad Big Wolf Meets Riding Hood Little Red”
CppCon 2018: Andreas Weis “Fixing Two-Phase Initialization”
Core C++ 2019 :: Timur Doumler :: Initialisation in modern C++
Комментарии