Operator Overloading in C++
The only operators that can't be overloaded are the operators for scope resolution (::), member selection (.), and member selection through a pointer to a function(.*).
Almost all operators can be overloaded in C++:
+ - * / % ^ & |
~ ! , = =
++ -- << >> == != && ||
+= -= /= %= ^= & = |= *=
<<= >>= [ ] ( ) -> ->* new delete
http://www.cprogramming.com/tutorial/operator_overloading.html

浙公网安备 33010602011771号