[C++-sig] How to get items from a tuple
Ricardo Abreu
gumbeto at gmail.com
Fri Jan 16 14:16:16 CET 2009
Well, thank you. The problem was really that I didn't notice I had to
extract the int explicitly.
About the code being too compact, I'm not sure I got what you mean,
unless you would want me to have a variable in between the tuple and the
print just to hold the result of the cast, in which case I don't agree
you would gain on readability - you would see a cleaner print but you
would have to track another variable, and I really don't think that
(int)t[0] is that difficult to understand.
Anyway, thanks again,
Ricardo
More information about the Cplusplus-sig
mailing list