Unary Operators is an actively used design pattern. Operators with arity 1.
- the Unary Operators wikipedia page
- Have a question about Unary Operators not answered here? Email me and let me know how I can help.
Languages with Unary Operators include cpp
Example from cpp:
int count = 2; count++; ++count; count--; --count; &count; // address *count; // indirection +count; // Positive -count; // negative ~count; // one's complement !x; // logical negation sizeof count; sizeof(int); (float)count;
Last updated August 9th, 2020