Hello!
How can I iterate over a tuple (using C++0x)? I tried the following, but that doesn't work:
Error 1: sorry, unimplemented: cannot expand ‘Listener ...’ into a fixed-length argument list.
Error 2: i cannot appear in a constant expression.
So, how do I correctly iterate over the elements of a tuple?
Thanks!
Niels.
How can I iterate over a tuple (using C++0x)? I tried the following, but that doesn't work:
Code:
for(int i=0; i<std::tuple_size<T...>::value; ++i) std::get<i>(my_tuple).do_sth();
Error 2: i cannot appear in a constant expression.
So, how do I correctly iterate over the elements of a tuple?
Thanks!
Niels.
Comment