PATCH for PR18404 - Bug in regex_token_iterator::operator++(int) implementation
mclow.lists at gmail.com
Wed Jan 8 10:46:29 PST 2014
It’s not actually a bug in operator++(int), but rather in the copy constructor and the assignment operator, which causes copied regex_token_iterators to be coupled.
While I was fixing that, I added a drive-by fix in the assignment operator or regex_token_iterator as well:
if (__x.__result_ == &__x.__suffix_)
- __result_ == &__suffix_;
+ __result_ = &__suffix_;
i.e, there was a comparison instead of an assignment :-(
Added tests to make sure that the iterators were independent for both regex_iterator and regex_token_iterator.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10037 bytes
Desc: not available
More information about the cfe-commits