-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<iterator>
: istreambuf_iterator
violates [res.on.data.races]
#5066
Comments
This was mentioned in WG21-P3138. According to [istreambuf.iterator.ops]/1, it seems that synchronization or atomicity isn't intended. I guess this case can fall into "unless otherwise specified" in [res.on.data.races]/1, but an LWG issue seems desired to me. Edit: But it seems that |
It's unfortunate that SG9 polled against uniformly relaxing [res.on.data.races] for the In any case, I think I'd prefer relaxing the requirement that |
That was an inconclusive SG1 poll. res.on.data.races only applies to standard-provided iterator types anyway, and there’s a pretty small number of these. I might bring it back at some point, but not having it doesn’t cause me a lot of heartburn. Barry and I did consider the relaxation. That will require extensive changes all over the place (CPOs, concepts, all the iterator/range adaptors…) and we don’t consider that a worthwhile tradeoff. |
Yes, not really "polled against" so much as "didn't poll in favor of".
What, you didn't want to invest weeks of your time and WG21's to fix my design mistake? |
It would need to weaken everything starting from |
Or an |
Clarifying the discussion of WG21-P3138: this proposal will make an exception to [res.on.data.races]/3 for a particular standard library input iterator's member In theory, we could suggest to LWG that a similar exception be made for |
The existence of
mutable
members:STL/stl/inc/iterator
Lines 480 to 482 in a1bc126
modified by
const
member functions without any kind of mutual exclusion:STL/stl/inc/iterator
Lines 468 to 477 in a1bc126
is a veritable recipe for data races. We've traditionally considered fixing this to require ABI breakage, but I wouldn't be surprised if there were a way to replace some of the data members with atomics in such a way that we could provide a conforming implementation to new code that doesn't break down completely when linked to old code.
vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.
This was VSO-454475 / AB#454475.
The text was updated successfully, but these errors were encountered: