[quote name='doesnotcompute' timestamp='1302226064' post='4795774']
Would something like this work?
...
EDIT: You probably want to make the internal array heap allocated if it's going to be large but the idea is the same...
I think this is a bad idea as it just duplicates std::bitset except less efficiently. Also, your implementation has a serious bug since you're rounding down the size of the data array.
Also, isn't std::vector<bool> deprecated? I'd say use std::bitset instead.
[/quote]
I'm not saying my implementation is perfect, I threw it together in 5 minutes, but it's a starting point. I'd say it's probably not less efficient than an STL version if you have to muck around with things like [color=#1C2837][size=2]_SECURE_SCL to get them to not be horribly slow. It sounds like the OP has a very specific use for this and he knows things like the initial array size ahead of time. In my opinion this is a reasonable situation to roll your own solution rather than trying to get some standard library class to work for him.