Boost logo

Boost :

From: Martin Wille (mw8329_at_[hidden])
Date: 2004-08-11 11:56:14


Hello,

a momemnt ago, someone reported a problem on IRC regarding
boost::filesystem::path::iterator. He basically has code like
this:

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 `
boost::detail::postfix_increment_proxy<boost::filesystem::path::iterator>'
    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.

Regards,
m


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