C++ Class Template Argument Deduction - History, Uses, & Enabling it for Classes - Marshall Clow

  Рет қаралды 7,302

CppCon

CppCon

Күн бұрын

cppcon.org/
---
C++ Class Template Argument Deduction - History, How to Use it, and How to Enable it for Your Classes - Marshall Clow - CppCon 2022
github.com/CppCon/CppCon2022
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"
---
Videos Filmed & Edited by Bash Films: www.BashFilms.com
KZfaq Channel Managed by Digital Medium Ltd events.digital-medium.co.uk
#cppcon #programming #cpp

Пікірлер: 6
@JATmatic
@JATmatic Жыл бұрын
39:30 A good C++ template joke: "When stuff misbehaves you get to see the smoking remains"
@joachimjoyaux179
@joachimjoyaux179 Жыл бұрын
Great talk. Thanks !
@Bolpat
@Bolpat Жыл бұрын
About the question if requires clauses are valid for deduction guides: Yes, you can use requires clauses on deduction guides.
@PaulMetalhero
@PaulMetalhero Жыл бұрын
Great talk
@Bolpat
@Bolpat Жыл бұрын
​I wish compilers’ error messages wouldn’t spell out default template arguments. Also, why print namespaces, assuming the symbol is unambiguous.
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 28 МЛН
UNO!
00:18
БРУНО
Рет қаралды 3,3 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 60 МЛН
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 779 М.
Let's get comfortable with SFINAE (C++)
35:55
platis.solutions
Рет қаралды 6 М.
Stop Writing Classes
27:29
Next Day Video
Рет қаралды 932 М.
What is Dependency Injection?
6:48
Scott Bailey
Рет қаралды 115 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 121 М.
Мой новый мега монитор!🤯
1:00
Корнеич
Рет қаралды 1,7 МЛН
ноутбуки от 7.900 в тг laptopshoptop
0:14
Ноутбуковая лавка
Рет қаралды 3,6 МЛН
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 2,4 МЛН