I came across a code when reading an article, the author states that "the C++ standard library provides the following type definitions:"
namespace std {
namespace chrono {
typedef duration<signed int-type >= 64 bits,nano> nanoseconds;
typedef duration<signed int-type >= 55 bits,micro> microseconds;
typedef duration<signed int-type >= 45 bits,milli> milliseconds;
typedef duration<signed int-type >= 35 bits> seconds;
typedef duration<signed int-type >= 29 bits,ratio<60>> minutes;
typedef duration<signed int-type >= 23 bits,ratio<3600>> hours;
}
}
My question is what does signed int-type >= 64 bits
mean? Does it mean signed int
minus type
? And if so how do you interpret that?
It's not actual code; it only illustrates (in "natural" language) what is required for the template's type parameter in a compliant implementation.
So "signed int-type >= 64 bits" means "any signed integer type with at least 64 bits", but with fewer letters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With