This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++14 status.
Section: 23.2.3[container.requirements.dataraces]Status:C++14Submitter: Jonathan WakelyOpened: 2012-10-17Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [container.requirements.dataraces].
View all issues withC++14 status.
Discussion:
23.2.3[container.requirements.dataraces]/2 says "[…] implementations arerequired to avoid data races when the contents of the contained object in different elements in the same sequence, exceptingvector<bool>, are modified concurrently."
This should say "same container" instead of "same sequence", to avoidthe interpretation that it only applies to sequence containers.
[2013-03-15 Issues Teleconference]
Moved to Tentatively Ready.
[2013-04-20 Bristol]
Proposed resolution:
This wording is relative to N3376.
Change 23.2.3[container.requirements.dataraces]/2 as indicated:
-2- Notwithstanding (16.4.6.10[res.on.data.races]), implementations are required to avoid data races when the contents of the contained object in different elements in the same
-3- [Note: For asequencecontainer, exceptingvector<bool>, are modified concurrently.vector<int> xwith a size greater than one,x[1] = 5and*x.begin() = 10can be executed concurrently without a data race, butx[0] = 5and*x.begin() = 10executed concurrently may result in a data race. As an exception to the general rule, for avector<bool> y, y[0] = truemay race withy[1] = true. —end note ]