Re: [Boost-users] [Containers] Marshalling deques
Ion Gazta?aga:
El 22/08/2011 19:44, Brian Wood escribi?:
Would you be willing to add a function that gives that? Tia.
Yes, I think we need to think about a useful interface for that, maybe something like local_iterator in unordered containers or something like segmented iterator described by Matt Austern in his "Segmented Iterators and Hierarchical Algorithms" paper
If I could get the number of elements in the first chunk and the size of the chunks, that would be sufficient. (I believe the size of the chunks is constant within a deque instance.) I find it disappointing that the latest version of the standard doesn't have anything related to this and would rather just get something working than figuring out what would be a flexible, general interface. Shalom, Brian Wood Ebenezer Enterprises http://webEbenezer.net
El 24/08/2011 20:06, Brian Wood escribió:
Ion Gazta?aga:
El 22/08/2011 19:44, Brian Wood escribi?:
Would you be willing to add a function that gives that? Tia.
Yes, I think we need to think about a useful interface for that, maybe something like local_iterator in unordered containers or something like segmented iterator described by Matt Austern in his "Segmented Iterators and Hierarchical Algorithms" paper
If I could get the number of elements in the first chunk and the size of the chunks, that would be sufficient. (I believe the size of the chunks is constant within a deque instance.)
Not necessarily, but I think all implementations do that. The question is whether we should have a standard-friendly and implementation agnostic interface or an interface just for boost::deque implementation. Best, Ion
On Wed, Aug 24, 2011 at 2:06 PM, Brian Wood
If I could get the number of elements in the first chunk and the size of the chunks, that would be sufficient. (I believe the size of the chunks is constant within a deque instance.)
If you have pushed on the front/back then the first/last chunk won't be of the same size. (Or rather, the memory for the chunk will *probably* be the same size, but the chunk may have empty/invalid entries.)
I find it disappointing that the latest version of the standard doesn't have anything related to this and would rather just get something working than figuring out what would be a flexible, general interface.
I'd guess something like a "chunk iterator" that returns (on dereference) a range-like object describing the current chunk. Tony
participants (3)
-
Brian Wood
-
Gottlob Frege
-
Ion Gaztañaga