문제

Please help me understand this expression:

(dwStreamSizeMax >> 32i64)

I've never seen operands like 32i64 before. Thank you.

도움이 되었습니까?

해결책

From MSDN C++ Integer Constants:

64-bit integer-suffix: i64 LL ll

That is, 32i64 would be 64-bit sized constant of integer type, of value of 32. That is, it is (__int64) 32, or (int64_t) 32.

dwStreamSizeMax >> 32i64

Note that in the quoted expression even for 64-bit dwStreamSizeMax maximal shift bit count which makes sense is 63, which fits into 8-bit value (BYTE), hence 64-bit size specifier there is redundant.

다른 팁

It's the suffix for a 64-bit integer literal, not unlike L for a long or ULL for an unsigned long long. However, I believe it's a Microsoft-ism and not portable C++.

C++11 only provides suffixes for long and long long types (and their unsigned counterparts), the latter which is guaranteed to be 64 bits or more.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top