I wrote a simple variable template function, and I'm trying to understand why it does not work. (Its output counterpart works fine.)
As can be seen from the comments, I enter 1 2 3 for abc , and the output I get is 1 0 0 . Apparently, only a retains its value. Can someone explain why this is happening, and what can I do to fix it? Thanks!
EDIT :: Yes, apparently, I was mistaken in the concept of parameter packages! I also tried to do the following: rest_t... &rest , which gives me a compiler error.
Instead, if I write rest_t&... rest , it works as intended. I suppose it was just a syntax error on my side! Thanks for sending this as an answer, and deleting his answer in a minute! D:
source share