
Sebastian Redl wrote:
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.
I prefer <boost/next_prior.hpp> to 'std::advance'. That is nothing but a style(or optimization) issue, though. <boost/next_prior.hpp> also can be patched with your 'advance'. Regards, -- Shunsuke Sogame