
David Abrahams <dave@boost-consulting.com> writes:
Doug Gregor <dgregor@cs.indiana.edu> writes:
On Jul 13, 2004, at 5:49 AM, David Abrahams wrote:
Synge Todo <wistaria@comp-phys.org> 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" );
Actually, looking at the test, it's just wrong by any measure. The only thing it was compatible with was the old broken semantics for iterator_facade's postfix increment when it was implementing an input iterator. To be consistent with C++98, it should be
BOOST_TEST( (*dir_itr++).leaf() == "d1" ); ^
And to be consistent with the current WP, it should be
BOOST_TEST(implicit_cast<std::string const&>((*dir_itr++)).leaf() == "d1" );
I'll update the test appropriately.
OK, all fixed and checked in. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com