The following rules apply to unary operator declarations, where T denotes the class or struct type that contains the operator declaration: A unary +, -, !, or ~ operator must take a single parameter of type T and can return any type. A unary ++ or --operator must take a single parameter of type T and must return type T. A unary true or false operator must take a single parameter of type T and must return type bool. The signature of a unary operator consists of the operator token (+, -, !, ~, ++, --, true, or false) and the type of the single formal parameter. The return type is not part of a unary operator's signature, nor is the name of the formal parameter. The true and false unary operators require pair-wise declaration. A compile-time error occurs if a class declares one of these operators without also declaring the other. The true and false operators are described further in 14.16. [Example: The following example shows an implementation and subsequent usage of operator++ for an integer vector class: Note how the operator method returns the value produced by adding 1 to the operand, just like the postfix increment and decrement operators(14.5.9), and the prefix increment and decrement operators (14.6.5). Unlike in C++, this method need not, and, in fact, must not, modify the value of its operand directly. end example]