<<< Do not overload logical operators! | Index | >>> |
Use operators in ways which mimic their native use:
Don't take or return unexpected types.
Make sure you provide a complete set.
Use named functions at first, build operators on those later.
Be careful with conversion to other types.
Define assignment if you define a copy constructor.
Prefer member functions over non-members for operations that need access to the implementation.
Prefer non-member functions over members for operations that do not need access to the implementation.
<<< Do not overload logical operators! | Index | >>> |