Writing to different offsets in array always well defined Writing to different offsets in array always well defined multithreading multithreading

Writing to different offsets in array always well defined


From the C++14 standard (1.7/3):

Two or more threads of execution (1.10) can update and access separate memory locations without interfering with each other.

Where it previously defines (emphasis mine)

A memory location is either an object of scalar type or a maximal sequence of adjacent bit-fields all having non-zero width.

So the chars of the array are memory locations, but the array itself is not; therefore, separate threads writing to different chars do not interfere with each other.