Re:Maximal Min() and Max()
by sapiogram on Thursday August 08, 2024 @12:44PM
(#41193515)
How did that end up happening? Did you define addition recursively or something?
[ Parent
| on HN ]
The macros automatically derived the signedness and the minimum and maximum value of the integral types involved, in a way that didn’t made platform-specific assumptions like two’s complement or no padding bits. Cases like comparing signed long to unsigned long also needed extra logic, due to there being no larger type that encompasses both. I don’t remember the details, but it did have a significant number of nested macro invocations.