## 17.1 Operator Overloading - member vs. global

- Some operators (e.g., assignment) are required to be members
- Usually programmer has the choice
- Keep in mind:
  1. Non-members have only public access (or, make it a friend)
  2. No implicit conversion for implicit parameters
- Member function is preferable if
  - The left argument is modified (`+=`)
  - The data fields are not easily accessible

prev |top |next