Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range] Single Pass Range functionality
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-02-23 04:59:56


Edward Diener skrev:
> In the Boost Range documentation describing the Range concepts for a
> single pass range it lists in the expression semantics post-condition
> for boost::begin(a):
>
> "boost::begin(a) is either dereferenceable or past-the-end. It is
> past-the-end if and only if boost::distance(a) == 0."
>
> However the documentation for single pass range does not list
> boost::distance as a valid expression nor in the reference section is
> boost::distance listed as a single pass range function.
>
> Is boost::distance a valid function when applied to a single pass range ?

Yes. boost::distance() is specified in terms of std::distance().

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net