Boost logo

Boost Users :

Subject: Re: [Boost-users] [spirit][iterator] position_iterator regression in 1.37.0
From: Daniel James (daniel_james_at_[hidden])
Date: 2008-11-04 15:33:03

2008/11/4 Rainer Deyke <rainerd_at_[hidden]>:
> When using this type:
> boost::spirit::position_iterator<std::string::const_iterator>

This happened because position_iterator's tag has been changed to be a
forward iterator - before it was incorrectly labelled as the same type
of iterator as the underlying iterator, but it didn't implement them.
So iterator adaptor was supplying a buggy implementation of those
methods. It looks like you're using 'operator+' to increase the
iterator, it wouldn't give the correct position and could easily be
jumping over the wrong number of characters. If you're code was
previously compiling, and you were using position_iterator to get the
position, you'll probably get the wrong position.

Since you didn't include any code, my suggestion is that you should
use 'boost::next' to advance the iterator.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at