Zeljko Vrba wrote:
On Thu, Jul 26, 2007 at 11:16:08AM +1200, Richard Dingwall wrote:
Pardon me if it's just a two-dimensional example for simplicity, but why not use std::pair?
Orthogonality. Personally, I'd find it very cumbersome to make an exception for pairs and write t.first, t.second when I write t.get<N>() for larger tuples. Plus, if the tuple should grow at some point, you'd have to fix all occurences of .first and .second.
However, I have another question regarding tuples: the debugger expands tuple
to tuple [a large list of null_types in the template]. Do these null_types take space in the tuple, and do they slow down passing by value (due to unneccessary copying of null_type)?
No they don't (take space in the tuple, and do they slow down passing by value). Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net