code_junkie

In C++, can you have a function that modifies a tuple of variable length?

Nov 10th, 2011
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. template <typename... Types>
  2. void fun(typename std::tuple<Types...> my_tuple) {
  3. //Put things into the tuple
  4. }
  5.  
  6. get<i>(my_tuple);
  7.  
  8. get<i>(tup)
  9.  
  10. template
  11. void fun(typename std::tuple& my_tuple) {
  12. //Put things into the tuple
  13. }
Add Comment
Please, Sign In to add comment