4 ms·
That's great. Really, the only case in C++ I want operator overloading, is to implement standard math operators on custom types, like Vector3s, Matrices, and Bi
by Arelius 13y ago
That's great. Really, the only case in C++ I want operator overloading, is to implement standard math operators on custom types, like Vector3s, Matrices, and Bignums.
- humanrebar 13y agoAssuming you use smart pointers, you'll want overloading for pointer operators as well, even if you're not implementing the smart pointers yourself.
- Arelius 13y agoI'm not however sure that applies to Rust. And frankly I care a lot less about the pointer operators for smart pointers. Any old accessor is decent, and I find the overloaded pointer operators sometimes confusing. At the very least it's not quite as obvious as it is for math operators.