Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-08-23 19:56:07


At 07:46 AM 8/23/2003, David Abrahams wrote:

>But paths do have such an ordering. It's a lexicographic compare on
>the conceptual underlying vector they contain. In other words
>
> x.m_name < y.m_name
>
>Unfortunately, that vector isn't available to clients of path so you
>have to use x.string() < y.string(), which is only a poor substitute
>for the actual vector.

The hope is that the ability to iterate over the elements of the implied
vector would serve as well as an actual vector. Thus the begin() and end()
members. The assumption was that in the rare cases where an actual
std::vector was needed, it would be easy enough to copy from begin(),end().

Off the top of my head, I'd think path::iterator would be sufficient for
std::lexicographic_compare(), or is that not what you had in mind?

--Beman


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