3 ms·
You can easily implement borrowing in C++ classes. I worked on a large C++ code base (some 15 years ago, before Rust existed) which did this kind of thing: it
by kazinator 8y ago
You can easily implement borrowing in C++ classes.
I worked on a large C++ code base (some 15 years ago, before Rust existed) which did this kind of thing: it had references enforcing single ownership that was handed on assignment or passing.
Borrowing was of course done in the usual way, by passing down references (most often const ones).