MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xxfw9i/cppanditsvectorbooleans/19splw9gl8kv4/
r/ProgrammerHumor • u/Recent-Analysis-6880 • 10d ago
214 comments sorted by
View all comments
Show parent comment
25
funnily enough there absolutely is already std::bitset
std::bitset
and I have absolutely no idea how it's different
18 u/tiajuanat 10d ago Bitset is fixed size. Vector<bool> is dynamic, does not allow concurrent access and does not guarantee continuity of values in memory.Vector<bool> was meant to be an example template specialization, which is why it's so funky. 1 u/AL_O0 10d ago thank you, that does make more sense
18
Bitset is fixed size. Vector<bool> is dynamic, does not allow concurrent access and does not guarantee continuity of values in memory.
Vector<bool> was meant to be an example template specialization, which is why it's so funky.
1 u/AL_O0 10d ago thank you, that does make more sense
1
thank you, that does make more sense
View all comments
Show parent comment
25
u/AL_O0 10d ago
funnily enough there absolutely is already
std::bitsetand I have absolutely no idea how it's different