|
nkr
A C++20 library with a custom meta-programming language.
|
Negatable types are used to represent numbers that can be negated, i.e. set to a negative number. More...
Negatable types are used to represent numbers that can be negated, i.e. set to a negative number.
The name "negatable" was chosen for two reasons:
x for multiplication and + for addition. Just because a number is "signed" does not mean it is negatable, e.g. +1 simply means "positive 1" in a mathematical context. (In a C++ context, it is the operator to promote an integer type.) So the word "negatable" was chosen because it is obvious what you intend it to be capable of.signed is a C++ reserved word and cannot be used as a namespace name.