|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2007-10-08 10:55:11
Markus Schöpflin wrote:
> The Tru64/CXX std library implements copy as:
>
> while (first != last) *result++ = *first++;
>
> XPressive uses copy in format_backref_ like this:
>
> else if(BOOST_XPR_CHAR_(char_type, '&') == *cur) // whole match
> {
> ++cur;
> out = std::copy(
> this->sub_matches_[ 0 ].first,
> this->sub_matches_[ 0 ].second,
> out);
> }
>
> This results in calls of the post increment operator of
> case_converting_iterator, which returns a copy of the iterator object. The
> assignment operator then modifies this copy and not the original iterator,
> nullifying the changes done to the iterator object in the assignment operator.
>
> The test executes OK when I replace the implementation of copy with the
> following code:
>
> while (first != last)
> {
> *result = *first;
> ++first;
> ++result;
> }
Ah, ha! A million thanks Markus! I'll find a work around. And credit you
for your help, of course.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk