0
Is there a way of traversing a parameter pack in variadic templates without necessarily having to use recursion?
3 odpowiedzi
+ 2
c++17 Fold Expression:
https://en.cppreference.com/w/cpp/language/fold
https://code.sololearn.com/cG0cJ5I4RlwY/#cpp
+ 3
From what I can see BroFar is correct. They usually seem to be associated with a base case function that the "args" are passed to within the template pack function. Unless you knew the exact number of times, or number of args, you had to call the other function, then I don't really see how else you'd use them. That of course would make the purpose of a variadic parameter pack pointless though. Maybe somebody else has more experience with them and a different understanding.
+ 2
not really Anthony Maina