C++ Insights - Episode 19: How variadic templates work

  Рет қаралды 4,100

Andreas Fertig

Andreas Fertig

Күн бұрын

Пікірлер: 7
@aarfeenanees9147
@aarfeenanees9147 Жыл бұрын
I finally understand variadic templates. Thank you!
@andreas_fertig
@andreas_fertig Жыл бұрын
Perfect! My pleasure!
@constexprThoughts
@constexprThoughts 3 жыл бұрын
That was very helpful, thanks!
@davithov
@davithov 8 ай бұрын
So, in line 13 it is written min(m, ts....); Does that mean that at each step we reduce number of params in ts by 1 and pass it to 'b' ? it is also a bit confusing for me where exactly to put '...' . For example, why it is wrong to write like this: template
@andreas_fertig
@andreas_fertig 8 ай бұрын
Yes, we reduce the number of parameters by merging the minimum of a and b into a. Then, we grab the first parameter of the pack and pass it to b, reducing the number of parameters in the pack by one in each iteration. To your second part, it is convention. The ellipsis goes right to the entity it belongs to. In your example, the typename.
@davithov
@davithov 8 ай бұрын
@@andreas_fertig Thank you very much for personally answering to my question! It is an honour for me.
@jaime7295
@jaime7295 Жыл бұрын
why C++ is so fucking cmplex XDD?
C++ Insights - Episode 20: What's behind a std::initializer_list
6:45
Andreas Fertig
Рет қаралды 1,9 М.
Function Templates | C++ Tutorial
10:54
Portfolio Courses
Рет қаралды 9 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Templates in C++
17:58
The Cherno
Рет қаралды 611 М.
Variadic Templates - Template Metaprogramming in C++ - E3
13:31
C++ Insights - Episode 42: C++20: When is a struct an aggregate
4:52
C++ Insights - Episode 41: How type-traits work
6:44
Andreas Fertig
Рет қаралды 4,1 М.
TEMPLATES in Modern C++
9:31
cazz
Рет қаралды 35 М.
C++ Insights - Episode 40: The traps of returning references
9:08
Andreas Fertig
Рет қаралды 1,1 М.
Variadic Templates & Fold Expressions in C++
7:26
Logic Lambda
Рет қаралды 1,1 М.
C++ Weekly - Ep 357 -  typename VS class In Templates
5:38
C++ Weekly With Jason Turner
Рет қаралды 21 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН