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

你可能感兴趣的:(overloading)