
17 Oct
2009
17 Oct
'09
10:46 p.m.
On Thursday 15 October 2009 14:53:04 Sebastian Hegler wrote:
I noticed that having a std::vector containing boost::tuple elements has "dense" memory layout.
std::vector is guaranteed to layout data as a contiguous array of its elements, i.e., for a vector v of size k (parantheses added for clarity), ( &( v[0] ) )[m] points to v[m] for m less than k. I don't know a tuple could guarantee that its elements are stored in same way as a C struct. Regards, Ravi