4 Apr
2007
4 Apr
'07
8:46 p.m.
On 4/4/07, nicola
Hi, I would like an arbitrarily nested data structure, e.g. similar to std::vector< std::list<int> >, giving access to the elements of any of its subcontainers, but, at the same time, being a model of Container - in particular, having an iterator over all the elements in the last nesting level (int's in the previous example). Space/time efficiency is very important in my application.
Nicola
Depending on why you need to have nested containers in the first place, you might want to look at Boost MultiIndex. It might be able to replace your nested containers completely. Otherwise, I'd look at making custom iterators for visitation, but I'm not sure things like insert() will make sense in all situations. Tony