Synopsis: | Use operator overloading sparingly and in a uniform manner |
Language: | C++ |
Severity Level: | 9 |
Category: | Class Interface |
Description: |
A disadvantage in overloading operators is that it is easy to misunderstand the meaning of an overloaded operator (if natural semantics are not used). Do not use it if it can easily give rise to misunderstanding. Keep to the old advice: "do as the int's do". |