Varadic packs have been with us since C++11, however getting the nth element efficiently out of a variadic pack still remains not optimal/difficult.
During the years, with new standards emerging, more and more approaches have been discovered but no silver bullet has been found yet or has it?
If understanding of how std::get<N>(tuple) works sounds compeling then this session is for you!
In this case study we will explore different techniques of accessing the nth element of a variadic pack... starting from naive aproaches, through template meta-programming tricks, to compiler intrinsics. We will also focus and deep dive into C++20 features which enables new techniques in order to understand modern ways of dealing with varadic packs...
Comparison against different solutions also will be conducted including compilation times as well as readability.
At the end of this session, the audience will have a better understanding of C++20 features and how to deal with variadic packs...
Let's get ready to get all elements at Meeting C++ 2022!