Boost logo

Boost :

Subject: Re: [boost] Interest in a container which can hold multiple data types?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2015-05-06 06:51:43


Le 04/05/15 02:08, James Armstrong a écrit :
> Hello forum,
>
> I was wanting to gauge interest in a container I developed which can
> natively handle multiple data types (as opposed to using a container of
> boost::any). I have the templated source hosted on my github account at
>
> https://github.com/armstrhu/omni
>
> There is some documentation on the current functions under
> omni/doc/html/index.html. main.cpp has some example codes on inserting,
> retrieving, and manipulating the data within the container. The one caveat
> to using the container is that the function destroy<T>() must be called for
> all data types inserted into the container, I currently have an assert in
> the destructor which will hit if destroy<T>() is not called for a data
> type. Also, this requires using a modified version of
> boost/core/typeinfo.hpp, so you will need to replace the original with the
> one I provide. The changes simply keep the boost functionality even when
> C++ typeinfo is available.
>
> I am trying to guage interest in this, and if there is interest, get some
> feedback on additional functionality to include. The iterators I have now
> work, but they are inefficient and that will be fixed eventually.
> Currently, I'm calling the container an omni, but don't really like that
> name and am looking for suggestions for something better :)
>
> Thanks
Hi,

you should take a look at Fast polymorphic collections, Joaquin M. Lopez
Muñoz [1].
These kind of collection could provide an efficient iteration through
all the elements of the same type.

Best,
Vicente

[1] http://bannalia.blogspot.ca/2014/05/fast-polymorphic-collections.html


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk