
"John Maddock" <john@johnmaddock.co.uk> wrote in message news:00f001c72029$905cb050$a0331b56@fuji...
Joel de Guzman wrote:
You probably reply to ne.
I suppose I could have used a vector instead, but it's less elegant somehow.
How the std::vector<boost::variant> is less elegant?
1. It's could be implemented in cpp file. Your tuple based solution is in header right? 2. It allows dynamically sized entries, so you could skip some of the default values 3. It's as fast of could be even faster since we don't need to pass big structures around
No std::vector does a deep copy (read memory allocation) with every copy. That means vector based code would be several orders of magnitude slower than passing small-ish tuples up and down the stack.
I am sorry. I don't follow you. Could you write an example? Gennadiy