[libcxx] r203587 - Implement LWG 2360: 'reverse_iterator::operator*() is unimplementable'. Note that this is a (small) behavior change in the library. Reverse iterators whose base iterators' operator* return references to 'within themselves' have been sacrificed to the greater goal of avoiding data races.

Marshall Clow mclow.lists at gmail.com
Tue Mar 11 14:00:03 PDT 2014


On Mar 11, 2014, at 10:32 AM, Richard Smith <richard at metafoo.co.uk> wrote:

>  {
> -private:
> -    mutable _Iter __t;
> 
> This looks like an ABI break; is that OK?

Sigh. Yes; yes, it is.
This changes the size of a reverse_iterator.

Thanks for catching this, Richard. Apparently I was asleep at the wheel.

I’m open to suggestions here:
a) I can put the instance variable back, and never use it. No ABI break, but an unused iterator in every reverse iterator.
b) I can leave it the way it is, and say - yeah, it’s an ABI break. Fortunately, I suspect that very few people hvea a reverse_iterator stored in a data file somewhere.
c) Something else.. ?

— Marshall




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140311/54817b29/attachment.html>


More information about the cfe-commits mailing list