Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-11-23 18:26:57


Shunsuke Sogame wrote:
> FWIW, it seems the new Concept Check library is under construction (cvs
> head).
>
Hmm ... if it's scheduled for 1.35 then I'd better take a look.
> Can't forward it to 'std::advance'?
>
> Can't forward it to 'std::distance'?
>
Good point. Possibly the std versions have some special knowledge about
some iterators, too.
> Can give the difference_type to 'detail::distance' by using
> boost::type or explicit template parameter, which makes the code cute?
>
I could, but does it actually make the code shorter or more readable? It
doesn't seem like it to me.
> IMHO, std::advance is conceptually redundant.
>
How so? It's a useful utility for advancing non-random-access iterators
more than one step quickly.
> First <boost/next_prior.hpp> should be patched with your implementation
> if possible?
>
I'm not sure about that. Since they are utilities specifically for the
new iterator concepts, I think they should go into the iterator library.
> Also, I think this 'distance' might be contributed to Boost.Range,
> which has really 'boost::distance'(cvs head).
> The current implementation just forwards it to 'std::distance'.
>
Sounds good.

New version coming up once I've got me a Boost CVS and checked out the
new concepts.

Thanks,
Sebastian


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