You need to know what specific problems people find problematic std::vector<bool>since they are not necessarily applicable in your case. Probably the most important of them is that it does not necessarily touch. And here, the adjacent is probably wrong. The memory allocated for the whole vector will still be in pieces of contiguos, but &vec[0] + iwill not be the same as &vec[i].
However, many other qualities std::vectorare still preserved - it still provides random access at constant time, for example.
Bottom line - do not just be afraid, but understand the consequences.
source
share