Boost logo

Boost :

Subject: Re: [boost] [cpo-proposal] presentation of the idea
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-08-17 10:20:14


On 08/16/13 19:20, Larry Evans wrote:
> On 08/16/13 08:21, Santiago Tapia wrote:
[snip]
>>
>> Yes, that is the idea. Actually, whether the implementation uses a collection
>> of vectors or other mechanism is an implementation detail. I use a map
>> of vectors in the classifier container, but I will try other implementations.
> Is the map key something like the type_info:
>
> http://www.cplusplus.com/reference/typeinfo/
>
> If there is a separate vector for each type, then the storage for a
> container containing more than one type can't be contiguous,
> since the vectors for the containers for the types cannot be
> contiguous, or am I missing something? I think what Thorsten
> was aiming at in this post:
>
> http://article.gmane.org/gmane.comp.lib.boost.devel/243504
>
> was each element in the container was truly contiguous. IOW,
> given a container, c, then.
>
> c.insert(T1());
> c.insert(T2());
>
> The T1 inserted into c would be contigous with the T2.
>
[snip]
The attached demonstrates, I believe, what Thorsten was aiming at
an shows the storage of *different* types in contiguous storage.

HTH.

-regards,
Larry




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