Главная
Study mode:
on
1
Intro
2
template argument deduction in C++98
3
vector
4
pitfall!
5
magic!
6
trap #1: the order matters
7
trap #2: list-initialisation has priority
8
sequence containers
9
map
10
locks & mutexes
11
example with no arguments
12
other STL classes...
13
smart pointers
14
how to disable CTAD
15
type identity idiom
16
member typedef
17
templated ctor
18
std: function
19
deduction guides SFINAE
20
aggregates need explicit guides
21
CTAD uses the primary template
22
CTAD not just in declarations!
23
no CTAD in nested types
24
CTAD + smart pointer conversions
Description:
Explore Class Template Argument Deduction (CTAD) in C++17 through this comprehensive ACCU 2018 conference talk by Timur Doumler. Delve into the practical applications of CTAD and automatic deduction guides for writing cleaner, more concise code. Learn how to effectively use CTAD with the C++ standard library and when designing custom classes. Understand the language rules behind CTAD, including when and how to implement user-defined deduction guides. Discover potential pitfalls such as unexpected template argument deductions, constructor selection issues, and unsafe code scenarios, along with strategies to avoid them. Cover topics including template argument deduction in C++98, vector implementations, sequence containers, maps, locks, mutexes, smart pointers, type identity idioms, templated constructors, std::function, SFINAE, aggregates, and CTAD's interaction with nested types and smart pointer conversions.

Class Template Argument Deduction in C++17

ACCU Conference
Add to list