MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xxfw9i/cppanditsvectorbooleans/19srzdckcjc81/
r/ProgrammerHumor • u/Recent-Analysis-6880 • 11d ago
214 comments sorted by
View all comments
Show parent comment
2
It's not that uint8_t breaks vectors, it's that users of the template that don't know it uses a vector internally will use bool instead.
1 u/4xe1 6d ago Wouldn't they get a compiler error doing so? 1 u/PastaPuttanesca42 6d ago I'm not completely sure that in some cases there wouldn't be undefined behaviour, but even if it fails to compile the error will likely be horrible and not easily understandable.
1
Wouldn't they get a compiler error doing so?
1 u/PastaPuttanesca42 6d ago I'm not completely sure that in some cases there wouldn't be undefined behaviour, but even if it fails to compile the error will likely be horrible and not easily understandable.
I'm not completely sure that in some cases there wouldn't be undefined behaviour, but even if it fails to compile the error will likely be horrible and not easily understandable.
View all comments
Show parent comment
2
u/PastaPuttanesca42 9d ago
It's not that uint8_t breaks vectors, it's that users of the template that don't know it uses a vector internally will use bool instead.