From the man pages, I found that size_t has the range of 0 to SIZE_MAX, and ssize_t has the range of -1 to SSIZE_MAX. So, after printing those values on a 64bit system, I have the following results:
ssize_t max: 9223372036854775807
size_t max: 18446744073709551615
int main() {
std::println("ssize_t max: {}\nsize_t max: {}", SSIZE_MAX, SIZE_MAX);
}
Is there a reason for using a signed integer to allow the storage of negative values, instead of creating a macro like this (as an example for 64-bit machines):
#define OPERATION_ERROR 0xFFFFFFFFFFFFFFFF
and continue using unsigned integer, so you have 2 times the range?