r/cpp • • Oct 24 '24

Why Safety Profiles Failed

https://www.circle-lang.org/draft-profiles.html
178 Upvotes

347 comments sorted by

View all comments

Show parent comment

0

u/kronicum Oct 26 '24

With safe-cpp, this is valid code. Because it uses the same aliasing model as rust (only one exclusive mutable borrow active at a time).

How is it safe when you have two mutable (C++) references where one can indirectly alias another?

Your example uses a different kind of reference. You're answering a different question.