Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2007-11-09 09:23:44

Dear all,

As suggested by several people, I have started to rely on
range_difference<T>::type in all places of the library.

I have also updated the docs w.r.t new concepts and are working on
polishing them.

1.35 will introduce a new function

    template< class T >
    BOOST_DEDUCED_TYPENAME range_difference<T>::type size( const T& r );

that requires T to be a random access range. I also want to put a
post-condition saying "result >= 0", but was a bit in doubt when I read
the standards wording for std::distance():

"template<class InputIterator>
typename iterator_traits<InputIterator>::difference_type
distance(InputIterator first, InputIterator last);
4 Effects: Returns the number of increments or decrements needed to get
from first to last.
5 Requires: last shall be reachable from first."

How can one ever use decrements to get from first to last?

Any comments?


Boost list run by bdawes at, gregod at, cpdaniel at, john at