r/cpp • • Jul 29 '26

const_cast: A Necessary Evil

https://www.elbeno.com/blog/?p=1858
70 Upvotes

106 comments sorted by

View all comments

Show parent comment

1

u/bwmat Jul 31 '26

Specifically, if the user-supplied callback throws an exception, is the item popped or not?

I was thinking yes(mentioned that in my original comment), and not really considering non-standard -fno-exception scenarios