r/cpp • • Aug 13 '26

C++26: std::indirect

https://www.sandordargo.com/blog/2026/08/12/cpp26-indirect
164 Upvotes

157 comments sorted by

View all comments

Show parent comment

1

u/steveklabnik1 Aug 14 '26

Rust has a "marker traits", think a Concept with no member functions, around exception safety, named UnwindSafe. https://doc.rust-lang.org/stable/std/panic/trait.UnwindSafe.html

This is purely focused on memory safety, though, and logical issues can still crop up.

Because Rust doesn't use panics for normal error returns, it would not shock me if the ecosystem had these problems, but for me personally, since I never catch panics outside of the sorts of "web server doesn't terminate the process when a handler panics" sorts of cases, I've never been in a situation where I was even able to notice these bugs.

The culture is just very different.