On 10/31/2013 1:14 PM, MM wrote:
On 31 October 2013 16:10, Klaim - Joël Lamotte <mjklaim@gmail.com<mailto:mjklaim@gmail.com>> 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@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users