Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Maybe the point is that these operators only make sense with class objects, while others can be redefined for enums.
C++99 Standard, chapter 13.5 Overloaded operators:
An operator function shall either be a non-static member function or be a non-member function and have at
least one parameter whose type is a class, a reference to a class, an enumeration, or a reference to an enu-
meration. It is not possible to change the precedence, grouping, or number of operands of operators. The
meaning of the operators =, (unary) &, and , (comma), predefined for each type, can be changed for spe-
cific class and enumeration types by defining operator functions that implement these operators. Operator
functions are inherited in the same manner as other base class functions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question