Displaying 2 results from an estimated 2 matches for "make_reverse_iterator".
2014 Mar 05
2
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
On 2014 Mar 2, at 22:27, Chandler Carruth <chandlerc at google.com> wrote:
>
> On Sun, Mar 2, 2014 at 10:13 PM, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> On Sun, Mar 2, 2014 at 9:26 PM, Chris Lattner <sabre at nondot.org> wrote:
>
> On Mar 2, 2014, at 8:53 PM, Renato Golin <renato.golin at linaro.org> wrote:
>
> > On 3 March 2014
2014 Mar 05
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...se(Range &R) {
reverse(std::begin(R), std::end(R));
}
On the other hand, “reversed” sounds like an accessor, and I’d expect it to look something like this:
template <class Range> reversed_range<Range::iterator>
reversed(Range &R) {
return make_range(make_reverse_iterator(std::end(R)),
make_reverse_iterator(std::begin(R)));
}
template <class Range> reversed_range<Range::const_iterator>
reversed(const Range &R) {
return make_range(make_reverse_iterator(std::end(R)),
make_reverse_ite...