3 ms·
Note that this is a similar technique to one done in Andrei Alexandrescu's book Modern C++ Design that used C++98. IIRC he called it TypeList and used that to
by RcouF1uZ4gsC 6y ago
Note that this is a similar technique to one done in Andrei Alexandrescu's book Modern C++ Design that used C++98.
IIRC he called it TypeList and used that to actually implement tuple as library type.
When C++11 variadic templates came out, a lot of C++ meta programmers breathed a huge sigh of relief of being able to abandon that technique. In addition, to being a pain to work with, because of the extensive use of recursion, it can take a large toll on compile times.
Variadic templates and being able manipulate tuples generically are probably the two biggest things I miss when programming Rust.
- pjmlp 6y agoAnd with constexpr and its variants, alongside auto templates, fold expressions, and now concepts, yet another legion breathed a huge sigh of relief to be able to abandon all those tag dispatch based techniques.