MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xxfw9i/cppanditsvectorbooleans/19sroyt7v1679/?context=3
r/ProgrammerHumor • u/Recent-Analysis-6880 • 13d ago
214 comments sorted by
View all comments
Show parent comment
1
Yes, everybody says it should have been a different type while vector<bool> should be a regular vector.
vector<bool>
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.
4
And everyone knows it - but as long as any code uses vector<bool>::reference::flip() it's hard to fix.
vector<bool>::reference::flip()
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.
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.