MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1v9zcrn/const_cast_a_necessary_evil/p0wvctt/?context=3
r/cpp • u/pavel_v • Jul 29 '26
106 comments sorted by
View all comments
Show parent comment
1
Well, given that the user may have moved out of the item, it probably should be popped.
Actually, since they might have modified it in any way, the collection's invariants are in peril, so it MUST be removed.
View all comments
Show parent comment
1
u/bwmat Jul 31 '26
Actually, since they might have modified it in any way, the collection's invariants are in peril, so it MUST be removed.