Opened 15 years ago

Closed 15 years ago

#1151 closed Feature Requests (invalid)

[range] make_indirect_range()

Reported by: Marcus Lindblom <macke@…> Owned by: Thorsten Ottosen
Milestone: To Be Determined Component: range
Version: Boost 1.34.1 Severity: Cosmetic
Keywords: Cc:

Description

The following function is useful sometimes:

template <class R>
inline boost::iterator_range<boost::indirect_iterator<typename boost::range_result_iterator<R>::type > > 
make_indirect_range(R& r)
{
    return boost::iterator_range<boost::indirect_iterator<typename boost::range_result_iterator<R>::type > > (r);
}

I'd assume there ought to be similar functions for all iterators presented? Or is there an easier way to do this?

P.S. No component for range yet?

Change History (2)

comment:1 by Marshall Clow, 15 years ago

Component: Nonerange
Owner: set to Thorsten Ottosen

comment:2 by Thorsten Ottosen, 15 years ago

Resolution: invalid
Status: newclosed
Type: PatchesFeature Requests

The generator functions are useful. I'm still waiting for somebody to implement range_ex, which adds all these fancy functions and more.

Note: See TracTickets for help on using tickets.