From Jason Turner

[container.requirements.dataraces]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpeolwsur7/{from.md → to.md} +10 -9
tmp/tmpeolwsur7/{from.md → to.md} RENAMED
@@ -4,16 +4,17 @@ For purposes of avoiding data races ([[res.on.data.races]]),
4
  implementations shall consider the following functions to be `const`:
5
  `begin`, `end`, `rbegin`, `rend`, `front`, `back`, `data`, `find`,
6
  `lower_bound`, `upper_bound`, `equal_range`, `at` and, except in
7
  associative or unordered associative containers, `operator[]`.
8
 
9
- Notwithstanding ([[res.on.data.races]]), implementations are required
10
- to avoid data races when the contents of the contained object in
11
- different elements in the same container, excepting `vector<bool>`, are
12
- modified concurrently.
13
 
14
- For a `vector<int> x` with a size greater than one, `x[1] = 5` and
15
- `*x.begin() = 10` can be executed concurrently without a data race, but
16
- `x[0] = 5` and `*x.begin() = 10` executed concurrently may result in a
17
- data race. As an exception to the general rule, for a `vector<bool> y`,
18
- `y[0] = true` may race with `y[1] = true`.
 
19
 
 
4
  implementations shall consider the following functions to be `const`:
5
  `begin`, `end`, `rbegin`, `rend`, `front`, `back`, `data`, `find`,
6
  `lower_bound`, `upper_bound`, `equal_range`, `at` and, except in
7
  associative or unordered associative containers, `operator[]`.
8
 
9
+ Notwithstanding  [[res.on.data.races]], implementations are required to
10
+ avoid data races when the contents of the contained object in different
11
+ elements in the same container, excepting `vector<bool>`, are modified
12
+ concurrently.
13
 
14
+ [*Note 1*: For a `vector<int> x` with a size greater than one,
15
+ `x[1] = 5` and `*x.begin() = 10` can be executed concurrently without a
16
+ data race, but `x[0] = 5` and `*x.begin() = 10` executed concurrently
17
+ may result in a data race. As an exception to the general rule, for a
18
+ `vector<bool> y`, `y[0] = true` may race with
19
+ `y[1] = true`. — *end note*]
20