Skip to content

Commit

Permalink
Update ex10_34_35_36_37.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
qwert2603 authored and pezy committed Jan 30, 2015
1 parent c1d0a6e commit 62b011b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ch10/ex10_34_35_36_37.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ vec2list_3_7_reverse(const std::vector<int> &v, std::list<int> &l)
//! 1 2 3 4 5 6 7 8 9 10
//! ^ ^^
//! rend rbegin
std::copy(v.rbegin() + 3, v.rend() - 2, std::back_inserter(l));
std::copy(v.crbegin() + 3, v.crbegin() + 8, std::back_inserter(l));
//! ^
//! @note: std::copy copies the range [first,last) into result.
//! hence, the arguments here denote:
//! [7 6 5 4 3 2)
//! ^ this one is specified but not included.
//! @note: also const vecrions if functions can be used. v.crbegin() and v.crbegin()
}

0 comments on commit 62b011b

Please sign in to comment.