Boost logo

Boost :

Subject: Re: [boost] poly_collection (was sentinels vs iterators)
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2014-08-27 16:03:27

Brian Wood <woodbrian77 <at>> writes:

> > El 23/08/2014 20:53, Joaquin M Lopez Munoz escribi?:
> >
> > This name misses the critical feature that elements are polymorphic.
> Why use collection rather than container? poly_container.

To my mind, "collection" implies some sort of unorderedness, so the term
seems more specific than plain "container". Another possibility would
be "bag", although that sounds to me, well, too baggy.

> I couldn't sleep for a while last night and my thoughts turned
> to this subject. I had thought this was an interesting (birds of
> a feather) idea and then realized it would also be helpful from
> a serialization perspective. Rather than having to marshal a
> type identifier before each instance, you could (iiuc) marshal
> a type identifier and how many instances will follow. [...]
> So it would reduce the serialization overhead compared to other
> containers.

I don't know enough about Boost.Serialization to confirm/deny
whether the lib provides this sort of optimizations. Having a look
at the stuff produced by serializing a vector might give some clues.

> I think it's a good idea and look forward to seeing it developed further.

I'll definitely try to spare some time during this year to crank up

Joaquín M López Muñoz

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