std::vector
Std::vector<bool>
void* wut
while (1)
{
OP is a faggot
}
LOL THIS IS SYNTAXERROR XD
>virtual
YOBA ETO TY
>error: OP is undefined
std::bitset
is there even ever a correct time to use this over some ints with bitwise operators?
it's dynamic memory; otherwise, use bitset. the problem with std::vector is that it's 1. not what you expect it to be and 2. not a standard library container. if you were to implement a similar structure yourself, you probably couldn't beat it, but it really should be a specialization of std::vector.
When you want the person after you to read the code and be able to understand it.
So basically never? Anyway, this bitset / vector of bools thing is confusing. Why use bitset instead of an int?
that's what comments are for
when you need more than 64 bools?
structs can contain more than 1 int.
sounds tedious desu
or you can use an array. the point is, it seems like a waste if you need a fucking vector for just bools.
std::bitset
You need to include Sup Forums.h which contains all the macros (memes)
>not what you expect it to be
In what way would it not be what you expect it to be?
How the fuck is an array of ints in a struct better than a vector of bools?
Do you hate using existing libraries or something?
nigger::nigger
>not what you expect it to be
What do you mean by this? It's exactly what I expect: A specialization of vector that actually only uses 1 bit per element, as opposed to the 8 most custom implementations would.
you can't get the adress of its elements because they're not adressable