Looking into the standard N3291 I do not find any reference for tuple
to support begin()
and end()
. But when I look at my notes from years back I seem to have jotted down that I need to look into that later. And here we are.
I can not find any trace of tuple<...>.begin()
or tuple<...>.end()
in the current C++0x standard, is this correct? It is not possible to pass a tuple with its iterators to an algorithm, nor can one for
-loop over it, right?
tuple<int,string,double> val;
for(auto a : val) cerr << val; // very wrong!
which is of course nonsense, because what should auto
be?
I need the confirmation that my notes contain an error, and that there is no way to get those iterators for tuple elements. Or maybe there was an abandoned path in the standards discussion?
Note: I am aware of that one can use TMP or Variadic Templates to implement a do-for-all-elements-of-a-tuple, but my question is really about iterators.