Boost logo

Boost :

From: Damien Fisher (damien_at_[hidden])
Date: 2002-05-15 21:29:36


On Thu, 16 May 2002, Damien Fisher wrote:

> template<typename FwdIt>
> std::iterator_traits<FwdIt>::distance_type n
> distance_n(
> FwdIt first, FwdIt last,
> std::iterator_traits<FwdIt>::distance_type n
> )
> {
> std::iterator_traits<FwdIt>::distance_type i = 0;
> while(i != n && first != last)
> {
> ++first;
> ++i;
> }
>
> return i;
> }

Argh! Please substitute difference_type for distance_type.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk