Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2004-07-13 09:42:48


On Jul 13, 2004, at 5:49 AM, David Abrahams wrote:
> Synge Todo <wistaria_at_[hidden]> writes:
> It appears that the old input iterator requirements require that *r++
> returns value_type instead of a proxy. However, *r++ must be a proxy
> if the iterator is writable. Since there's no way to detect iterator
> writability reliably, I'm going to have to make *r++ return value_type
> whenever the specified iterator category is strictly
> std::input_iterator_tag.
>
> I'll let everyone know when it's checked in

FYI, the operations_test.cpp test of the filesystem lib fails unless
the return type of *r++ is value_type (where r is a
directory_iterator). The problematic line is, of course:

BOOST_TEST( (*dir_itr++).leaf() == "d2" );

directory_iterator uses single_pass_traversal_tag, not
std::input_iterator_tag. Granted, there's a big comment in that same
block of code (near line 100 of boost/filesystem/operations.hpp) that
indicates how unsure the author was about proxies :)

        Doug


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