Skip to content

Commit b1809df

Browse files
committed
cpp iterator: move to new comment format
1 parent 0fc6a91 commit b1809df

7 files changed

Lines changed: 291 additions & 282 deletions

File tree

‎cpp/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
1. [utility](utility.cpp)
9999
1. [pair](pair.cpp)
100100
1. [tuple](tuple.cpp)
101+
1. [std_move](std_move.cpp)
101102
1. Smart pointers
102103
1. [unique_ptr](unique_ptr.cpp)
103104
1. [shared_ptr](shared_ptr.cpp)

‎cpp/algorithm.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ int main() {
9090
//
9191
// Vs memcpy: can compile down to an assembly optimized memcpy for arrays apparently, so just always use this:
9292
// https://stackoverflow.com/questions/4707012/is-it-better-to-use-stdmemcpy-or-stdcopy-in-terms-to-performance
93+
//
94+
// Handles overlap in the correct direction: https://stackoverflow.com/questions/1952972/does-stdcopy-handle-overlapping-ranges/53487672#53487672
9395
{
9496
// Newbie basic class usage.
9597
{
@@ -297,7 +299,7 @@ int main() {
297299
{
298300
std::vector<int> v{0, 1, 2, 3, 4};
299301
auto end = v.end();
300-
v.erase(std::remove_if(v.begin(), end,
302+
v.erase(std::remove_if(v.begin(), end,;
301303
[](int i) {return i % 2 == 1;}), end);
302304
assert((v == std::vector<int>{0, 2, 4}));
303305
}

0 commit comments

Comments
 (0)