Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-08-22 14:13:54

At 12:56 PM 8/11/2004, Martin Wille wrote:
>a momemnt ago, someone reported a problem on IRC regarding
>boost::filesystem::path::iterator. He basically has code like
>using boost::filesystem::path;
>path::iterator i = somepath.begin();
>path::iterator j = i++;
>That code used to work but stopped working recently.
>Now, there is a compiler error saying that the value
>returned by i++ is not suitable for constructing j:
>error: conversion from `
> to non-scalar type `boost::filesystem::path::iterator' requested
>I suspect the change was caused by a recent change to iterator adaptors.
>Investigation of the problem revealed that the documenation for
>path::iterator says it is a bidirectional iterator while the
>implementation uses single_pass_traversal_tag. This looks
>wrong to me.

I agree with your analysis.

What is weird is that even though the single_pass_traversal_tag is given,
the path_test.cpp regression test uses operator-- in tests, and they
compile fine.

So it looks like there is also a bug in iterator adaptors too, since I
would think that the use of operator-- on a single pass iterator should



Boost list run by bdawes at, gregod at, cpdaniel at, john at