r/cpp
•
u/steveklabnik1
•
Oct 24 '24
•
1
Why Safety Profiles Failed
https://www.circle-lang.org/draft-profiles.html
180
Upvotes
View all comments
Show parent comment
12
u/seanbaxter Oct 26 '24
It's always possible to use a safe class unsafely from an unsafe context. Same as in Rust. If you dereference a dangling pointer, borrow from that lvalue, and pass it to a safe function, that's an unsound use. The guarantee is that UB won't originate from safe code, not that safe code is impossible to use in an unsound manner.