bool array;the assignment
array = true;is atomic.
std::vector<> on the other hand has a template specialization for bools, which merges them into integer values to safe space. Using std::vector<bool>
std::vector<bool> vecArray; //... vecArray = true;becomes:
unsigned char tmp = vecArray; tmp = tmp | (1 << 0); vecArray = tmp;which is not atomic.
Edit: On the notion of merging the bools into integer types, have you considered C-style flags or, for a more array like experience, std::bitset?