[range] why not adding conversion operator std::pair<FTI.FTI> to boost iterator_range

Wouldn't it be a good idea to add a conversion operator to the class iterator_range? This would allow to write functions returning a range, instead of a pair of iterators, but boost::tie would still work with it. Best regards, andreas -- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri

On Wednesday 11 June 2014 08:58:44 Andreas Fabri wrote:
Wouldn't it be a good idea to add a conversion operator to the class iterator_range?
I suppose, the problem is that there is no reliable way to know that a certain type T is an iterator.

By contract it is an ForwardTraversalIterator template< class ForwardTraversalIterator > class iterator_range http://www.boost.org/doc/libs/1_55_0/libs/range/doc/html/range/reference/uti... andreas On 11/06/2014 14:34, Andrey Semashev wrote:
-- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri

On Wednesday 11 June 2014 14:49:48 Andreas Fabri wrote:
Yes, but AFAIK this requirement is not enforced in code. The implementation should prohibit conversion from pairs of types that are not model of this concept. Implementing that check might be difficult or heavy for the rest use cases.
participants (3)
-
Andreas Fabri
-
Andrey Semashev
-
Neil Groves