Entry tags:
container.requirements.dataraces
From ISO/IEC JTC1/SC22/WG21 N2691=08-0201:
23.1.2 Container data races
- For purposes of avoiding data races (17.4.4.6), implementations shall consider the following functions to be const:
begin, end, rbegin, rend, front, back, data, find, lower_bound, upper_bound, equal_range, and, except in
associative containers, operator[]. - Notwithstanding (17.4.4.6), implementations are required to avoid data races when the contents of the contained object
in different elements in the same sequence are modified concurrently. - [ Note: For a vector
x with a size greater than one, x[1] = 5 and *x.begin() = 10 can be executed concurrently
without a data race, but x[0] = 5 and *x.begin() = 10 executed concurrently may result in a data race. —end note ]