Boost logo

Boost :

Subject: Re: [boost] sentinels vs iterators
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2014-08-23 14:53:44

Mathias Gaunard <mathias.gaunard <at>> writes:

> On 21/08/2014 12:12, Joaquin M Lopez Munoz wrote:
> > Some
> > months ago I explored a container-like construct for polymorphic
> > objects that group elements by run-time type so as to greatly
> > speed up for_each processing:
> >
> >
> IMHO you're comparing oranges and apples, the memory layout and
> traversal properties are entirely different.

Absolutely, this is precisely the point of the article: if you are managing
collections of polymorphics objects and traversal order is not relevant,
you are probably better off using something like poly_collection (or the
intrusive structure you mention) rather than
std::vector<std::unique_ptr<Base>> (or boost::ptr_vector<Base>, for that

Joaquín M López Muñoz

Boost list run by bdawes at, gregod at, cpdaniel at, john at