Support for std::deque


Will post a patch once I verified I have it working.

file attachments


mwpowellhtx wrote Jan 20, 2015 at 8:50 PM

Haven't checked, but with the copy, paste, and replace, seems fairly innocuous. Feel free to merge, correct, etc. Thank you...

mwpowellhtx wrote Jan 20, 2015 at 9:15 PM

Unlike vector, deque has no reserve, etc.

Pending some unit testing. It's 'building' at any rate.

mwpowellhtx wrote Jan 20, 2015 at 9:17 PM

Won't let me remove previous attachment.

marten_range wrote Jan 30, 2015 at 4:12 PM

Please make a pull request, makes it alot easier to merge.

mwpowellhtx wrote Jan 30, 2015 at 5:22 PM

No problem. Would you mind clarifying, I'm not sure the version from codeplex, or that I downloaded at any rate, is at least a version or two back from what is on github. i.e. I am seeing where things like (line 148):
typedef             value_type const *          iterator_type   ;
was changed to simply:
typedef             value_type*                 iterator_type   ;
Additionally, along the same lines for things such as (line 1938):
typedef                 value_type const &                  return_type     ;
typedef                 value_type                          return_type     ;
Examining the header comments I'm not sure precisely what version or versions we are talking about, for starters. That would make things a little easier to discern.

Thank you...

mwpowellhtx wrote Jan 30, 2015 at 5:26 PM

Without getting too far off topic, also clarify why the change. What is the significance of changing from reference to value-based, for example? Why the problem with constant references, for example? Wouldn't that be preferred to making a whole other copy of an instance?

mwpowellhtx wrote Jan 31, 2015 at 4:04 PM

@marten_range I am happy to help you out there, but you're going to need to work with me on that. Can you clarify for me? I can make some educated guesses, but if they're incorrect, can't say you weren't informed.

marten_range wrote Feb 4, 2015 at 5:46 PM

Hi. I have been travelling a bit.

First you can assume that codeplex is most up to date (although I just updated github)

First question: Actually the most recent is value_type const *. If you run git blame you find that the commit where this happened is:
commit b3e1ded46215d145d2d9ec28a5cabad02ca690c9
Author: mrange marten_range@hotmail.com
Date: Fri Jul 4 20:54:34 2014 +0200
from_array now handles const arrays
IE I had forgot to specify const properly.

Second question:

The most recent is actually value_type const &, when running blame I find:

commit d6d7b2814dcd5261f7a4af11eb1611612c60c09d
Author: Todd Johnson tjohnson@ball.com
Date: Wed Jul 2 20:50:00 2014 +0200
Added caching to select.
This resolved a rather serious issue where when using select the predicate was invoked twice.

mwpowellhtx wrote Feb 4, 2015 at 6:16 PM

Appreciate the response. I'll double check for deque merge.

mwpowellhtx wrote Feb 4, 2015 at 6:24 PM

Will be creating a PR from github.

marten_range wrote Feb 4, 2015 at 8:23 PM

That looks about right... should be a pretty straightforward merge. will look into it tomorrow.