I finally understand variadic templates. Thank you!
@andreas_fertig Жыл бұрын
Perfect! My pleasure!
@constexprThoughts3 жыл бұрын
That was very helpful, thanks!
@davithov8 ай бұрын
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_fertig8 ай бұрын
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.
@davithov8 ай бұрын
@@andreas_fertig Thank you very much for personally answering to my question! It is an honour for me.