Skip to main content

Timeline for C++ Vector The basics

Current License: CC BY-SA 3.0

17 events
when toggle format what by license comment
Apr 13, 2017 at 12:40 history edited CommunityBot
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Mar 27, 2016 at 21:18 vote accept Loki Astari
Mar 27, 2016 at 20:20 answer added Nick timeline score: 3
Mar 23, 2016 at 21:40 answer added ilmale timeline score: 2
Mar 22, 2016 at 0:48 history edited Loki Astari
edited tags
Mar 21, 2016 at 15:52 answer added Jerry Coffin timeline score: 6
Mar 21, 2016 at 6:34 comment added Loki Astari @DarthGizka: Yes this is minimal. That is why other examples on codereview get so many comments when they try and implement their own vector. But also note I wrote this as an exploration of why std::vector is written the way it is. This is the result of five blog posts (so you can see the reason for each feature in the blog). But even my code needs a review. :-)
Mar 21, 2016 at 6:13 comment added DarthGizka That must be some new meaning of 'minimal' that I wasn't previously aware of... I'm glad that we can usually get away with #include <vector>.
Mar 21, 2016 at 6:02 comment added Quuxplusone For the record, your "another bug" was indeed the bug I was referring to with that third sentence. :)
Mar 21, 2016 at 5:53 history edited Loki Astari CC BY-SA 3.0
added 4 characters in body
Mar 21, 2016 at 5:52 comment added Loki Astari @Quuxplusone: Thanks. rbegin()/rend() oops mistake added unit tests for that. Now fixed. std::forward Vs std::move still working on move semantics; so I get that wrong sometimes. Will have to write an article about the subject. I doubt that there is memory corruption with that. But while adding some unit tests to test the theory; I did find another error. Need std::max() to make sure capacity of 0/1 scales up correctly.
Mar 21, 2016 at 5:41 history edited Loki Astari CC BY-SA 3.0
added 33 characters in body
Mar 21, 2016 at 2:51 comment added Quuxplusone Not a full answer, but three bug reports: Your rbegin() function needs to return reverse_iterator, not iterator. Your moveBackInternal function needs to call std::move(value), not std::forward<T>(value). I suspect that Vector<int>(1).push_back(2) will corrupt memory.
Mar 20, 2016 at 22:21 history tweeted twitter.com/StackCodeReview/status/711679063576944640
Mar 20, 2016 at 20:30 history edited Loki Astari CC BY-SA 3.0
added 198 characters in body
Mar 20, 2016 at 19:38 history edited Loki Astari CC BY-SA 3.0
added 26 characters in body
Mar 20, 2016 at 19:23 history asked Loki Astari CC BY-SA 3.0