intptr_t
intptr_t(intptr_t)
符号あり整数型
intptr_t → void *、void * → intptr_tに変換できる
アドレス演算
ビット埋め込み(tagged pointer)
ポインタを整数APIに渡す
ハッシュ値化
シリアライズ的用途(限定的)
確認用
Q. intptr_t
メモ
intptr_t, uintptr_tの記述
7.18.1.4 Integer types capable of holding object pointers
1 The following type designates a signed integer type with the property that any valid
pointer to void can be converted to this type, then converted back to pointer to void,
and the result will compare equal to the original pointer:
intptr_t
The following type designates an unsigned integer type with the property that any valid
pointer to void can be converted to this type, then converted back to pointer to void,
and the result will compare equal to the original pointer:
uintptr_t
These types are optional.
↓
7.18.1.4 オブジェクトポインタを保持できる整数型
1 以下の型は、voidへの有効なポインタをこの型に変換し、voidへのポインタに戻すことができ、その結果は元のポインタと等しく比較されるという特性を持つ符号付き整数型を指定します:
intptr_t
次の型は符号なし整数型で、voidへの有効なポインタをこの型に変換し、voidへのポインタに戻すことができ、その結果は元のポインタと等しく比較されるという特性を持つ:
uintptr_t
これらの型はオプションである。
調査用
Wikipedia.icon
Wikipedia.icon