k2-operators.txt monadic: ++/-- prefix or postfix: all numeric base types and enums returns value of same type, not ref ! all types returns bool ~ all integer base types returns same type + all numeric base types returns signed type of same size (propagated to min. int) - all numeric base types returns signed type of same size (propagated to min. int) assignments: = += ... LHS operator defines required RHS operator returns void :? && || << LHS: all numeric base types >> RHS: all integer base types returns LHS type == != >= <= > < all numeric base types and enums propagates both sides to same size (min. int) compare 2 floats of same size compare 2 signed or 2 unsigned ints of same size compare unsigned and signed int of same size returns bool + all numeric base types and enums propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns signed type - all numeric base types and enums propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns signed type * all numeric base types propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns signed type / all numeric base types propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns signed type % all integer base types propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns signed type & all integer base types and enums propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns unsigned type! | all integer base types and enums propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns signed type ^ all integer base types and enums propagates both sides to same size (min. int) returns propagated type signedness mismatch: returns signed type enums: + - & | ^ LHS: enum RHS: same enum or integer returns enum += -= &= |= ^= ++ -- because operator+ is defined, the modify&assign operators += etc. and ++/-- prefix/postfix are defined as well == != >= <= > < enums on either side are cast to their base type. in case of two enums they must be of same type.