dememax ([personal profile] dememax) wrote2008-07-29 01:01 pm
Entry tags:

container.requirements.dataraces

From ISO/IEC JTC1/SC22/WG21 N2691=08-0201:

23.1.2 Container data races


  1. 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[].

  2. 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.

  3. [ 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 ]

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting