0

Possible Duplicate:
How do I expand a tuple into variadic template function's arguments?

Currently, I have function of the form :

template<typename Type, typename... List> 
void myFunction(Type& x, List&... list);

I also have a tuple :

std::tuple<int, unsigned int, unsigned long long int, int> myTuple;

Is it possible (and if yes, how ?) to pass myTuple to myFunction ?

Community
  • 1
  • 1
Vincent
  • 57,703
  • 61
  • 205
  • 388
  • 1
    The preferred technique is to use [a pack of indices](http://stackoverflow.com/a/7858971/726300). – Luc Danton Sep 30 '12 at 22:29
  • You want specific answer for this very tuple: `std::tuple` or general answer for any tuple. The general one is pointed by nosid. – PiotrNycz Sep 30 '12 at 22:46
  • Are you trying to pass the *contents* of the tuple to the function, or just the tuple itself? – Nicol Bolas Sep 30 '12 at 22:48
  • @PiotrNycz : I want a general aswer for any tuple with arithmetic types. `myTuple` is just an example. @Nicol Bolas : I want to pass the contents of the tuple (I would like to unpack the tuple) – Vincent Sep 30 '12 at 22:51

0 Answers0