3 ms·
It should be an error, not a warning (default or not). In C++ you can overload '==' to do anything you want, including things that have side effects[0]. Witho
by dagw 10y ago
It should be an error, not a warning (default or not).
In C++ you can overload '==' to do anything you want, including things that have side effects[0]. Without deeper introspection into the code, it's tricky to check if it's an error or not.
[0] PS. Never do this!
- WalterBright 10y agoOverloading means calling a function, and is treated like calling a function.