template<typename TDerived>
struct OperatorTemplate< TDerived >
Class defining additional operators from existing ones.
Useful to define an arithmetic types, without explicitly listing all the necessary operators. The derived class can use all or just few of defined operators. The operators come in packs; if the derived class defines operators +=, OperatorTemplate also provides binary operator +. If it further defines an unary operator -, the OperatorTemplate provides operators -= and binary -.
Besides these, the class can implement operator *=(float), i.e. multiplication by scalar. The OperatorTemplate then provides binary operator *(class, float) and *(float, class), and also operator /= and operator/(class, float). This 'pack' of operators is independent from the summation/subtraction operators; both can be implemented, or just one of them.
Finally, the derived class can implement the equality operator==, the OperatorTemplate then also provides operator !=. This pair of operators is also independent from all previous operators.
Definition at line 27 of file OperatorTemplate.h.