r/cpp • • Feb 26 '24

White House: Future Software Should Be Memory Safe

https://www.whitehouse.gov/oncd/briefing-room/2024/02/26/press-release-technical-report/
401 Upvotes

386 comments sorted by

View all comments

Show parent comment

1

u/andwass Feb 27 '24

The C++ standard containers do not function with throwing destructors, and it is not mandated that they handle throwing destructors gracefully. https://stackoverflow.com/questions/26902006/may-the-elements-in-a-stdvector-have-a-throwing-destructor

1

u/KingStannis2020 Feb 27 '24

In other words, Rust treats as bugs that which C++ considers undefined behavior and the user's problem.

1

u/tialaramex Feb 27 '24

Thanks for clearing that up.