If you have no reason to do this, the best option is probably to use a vector:
std::vector<bool> map(256, false);
vector<bool>, however, is a specialization that is different from what you expect. Depending on the situation, you may prefer:
std::vector<char> map(256, false);
source
share