I have a tuple of unknown size (it’s template parametr of method)
Is it way to get part of it (I need throw away first element of it)
For example, I have tuple<int,int,int>(7,12,42). I want tuple<int,int>(12,42) here
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With help of a compile-time integer list:
We could construct the tail simply by parameter-pack expansion:
Usage:
(On ideone: http://ideone.com/Tzv7v; the code works in g++ 4.5 to 4.7 and clang++ 3.0)