logoalt Hacker News

randomNumber7 • today at 2:31 PM • 1 reply • view on HN

I heard the C++ guys regret defining vector<bool> using 1 bit per value.

Also for most code it will be premature optimization to worry about that.


Replies

KerrAvon • today at 2:47 PM

From what I can tell in a cursory web search, that regret is more about issues with C++ being unable to abstract that field vs bit divergence properly, not about the concept of having the specialization be bit-based, which is sound.

➕ show 1 reply