What is uintptr_t data type

后端 未结 5 714
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 04:15

What is uintptr_t and what can it be used for?

5条回答
  •  不思量自难忘°
    2020-11-22 05:04

    uintptr_t is an unsigned integer type that is capable of storing a data pointer. Which typically means that it's the same size as a pointer.

    It is optionally defined in C++11 and later standards.

    A common reason to want an integer type that can hold an architecture's pointer type is to perform integer-specific operations on a pointer, or to obscure the type of a pointer by providing it as an integer "handle".

提交回复
热议问题