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 char
s of the array are memory locations, but the array itself is not; therefore, separate threads writing to different char
s do not interfere with each other.