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