11 Jun
2014
11 Jun
'14
1:45 p.m.
On Wednesday 11 June 2014 14:49:48 Andreas Fabri wrote:
On 11/06/2014 14:34, Andrey Semashev wrote:
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
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.