[range] resulting range type

Hi All, When i implement range based algorithms i always have to write `boost::iterator_range<typename boost::range_iterator<R>::type>'. It is pretty annoying. i.e.: template<class R> boost::iterator_range<typename boost::range_iterator<R>::type> Algo(R& r); I would like to have special metafunction in Boost.Range for such cases to make code more cleaner: template<class R> typename boost::make_range<R>::type Algo(R& r); What do you think? -- Regards, Andrey

Andrey Torba wrote:
Hi All, When i implement range based algorithms i always have to write `boost::iterator_range<typename boost::range_iterator<R>::type>'. It is pretty annoying. i.e.: template<class R> boost::iterator_range<typename boost::range_iterator<R>::type> Algo(R& r);
I would like to have special metafunction in Boost.Range for such cases to make code more cleaner: template<class R> typename boost::make_range<R>::type Algo(R& r);
What do you think?
Can you use boost::sub_range<R> ? - Jeff

I would like to have special metafunction in Boost.Range for such cases to make code more cleaner: template<class R> typename boost::make_range<R>::type Algo(R& r);
What do you think?
I believe that boost::sub_range covers this use case. If it does not cover it then please provide additional information about your issue and I will gladly address your needs. Regards, Neil Groves
participants (3)
-
Andrey Torba
-
Jeffrey Hellrung
-
Neil Groves