
Eric Niebler wrote: [...]
Based on the test failure, I'm guessing the actual output will be:
Expected : Foo Bar Baz Actual : FOO BAR BAZ
Your expectations were right.
If that's the case, I'll be asking you to fire up a debugger. I can tell you exactly where to look, but only you can tell me what you'll find!
I did so and I think I've found the source of the problem. 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; } HTH, Markus