Boost logo

Boost Users :

Subject: Re: [Boost-users] container with large number of elements and a small number of invalide elements
From: MM (finjulhich_at_[hidden])
Date: 2013-11-01 13:28:22


On 1 November 2013 12:37, Jeff Flinn <Jeffrey.Flinn_at_[hidden]> wrote:

> On 10/31/2013 1:14 PM, MM wrote:
>
>> On 31 October 2013 16:10, Klaim - Joël Lamotte <mjklaim_at_[hidden]
>> <mailto:mjklaim_at_[hidden]>> wrote:
>>
>> What would "valid"/"invalid" means here?
>> If it's "exist" or "don't exist", then maybe using
>> boost::optional<MyPod> would be enough.
>>
>>
>> That's right. How about sizeof( boost::optional<MyPod> ) vs sizeof(
>> MyPOD ) ?
>> Also, what sort of iterator can iterate over just the valid values? or
>> how to implement one?
>> The point here is that there's a small number of elements that are
>> invalid, their indices in the container are random,
>>
>
> So why not keep the invalid items from getting into the container in the
> first place?
>
> Jeff
>
>
> ______________________________**_________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/**mailman/listinfo.cgi/boost-**users>
>

because they are processed at a later stage, their indices in the container
are relevant,



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net