On Wed Jan 08 2014 at 10:47:59 AM, Marshall Clow <[email protected]>
wrote:

> 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 :-(
>

Did Clang fail to diagnose this? Do you know why? (-Wunused-value should
catch things like this - assuming it's a builtin op==, not an overload
(though perhaps we could extend it to handle overloads... though that might
be risky))


>
> Added tests to make sure that the iterators were independent for both
> regex_iterator and regex_token_iterator.
>
> — Marshall
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to