From: David Abrahams (dave_at_[hidden])
Date: 2003-08-23 21:25:10
Beman Dawes <bdawes_at_[hidden]> writes:
> 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.
Good point; I keep overlooking that it's iterable.
> 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
No, I think you're right; it would be. My thinking was just limited
by, er... confusing paths with strings ;-)
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk