r/ProgrammerHumor • • 13d ago

Meme cppAndItsVectorBooleans

Post image
3.4k Upvotes

214 comments sorted by

View all comments

Show parent comment

1

u/Blue_Moon_Lake 12d ago

Yes, everybody says it should have been a different type while vector<bool> should be a regular vector.

4

u/TheThiefMaster 12d ago

And everyone knows it - but as long as any code uses vector<bool>::reference::flip() it's hard to fix.

IMO, the best solution is to make the new type, given the warning that change is coming, and then make the change. End the nonsense.