PATCH for PR18404 - Bug in regex_token_iterator::operator++(int) implementation
Marshall Clow
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.
— Marshall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR18404.patch
Type: application/octet-stream
Size: 10037 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140108/06f6ba16/attachment.obj>
More information about the cfe-commits
mailing list