cbase 1.50.0
C/C++ Static Template
Loading...
Searching...
No Matches
Size and Pointer Types

Types for memory sizing and pointer arithmetic. More...

Typedefs

typedef size_t usize
typedef ptrdiff_t isize
 Signed size type pointer-width, matches ptrdiff_t.
typedef uintptr_t uptr
typedef intptr_t iptr

Detailed Description

Types for memory sizing and pointer arithmetic.

Typedef Documentation

◆ iptr

typedef intptr_t iptr

Signed pointer-sized integer

Definition at line 80 of file base_types.h.

◆ isize

typedef ptrdiff_t isize

Signed size type pointer-width, matches ptrdiff_t.

Use for signed differences between pointers or sizes, and for APIs that need to return -1 as an error sentinel. POSIX defines ssize_t for this purpose but it is not available on Windows; ptrdiff_t is a portable equivalent.

Definition at line 77 of file base_types.h.

◆ uptr

typedef uintptr_t uptr

Unsigned pointer-sized integer

Definition at line 79 of file base_types.h.

◆ usize

typedef size_t usize

Unsigned size type - pointer-width, matches size_t. Use for sizes and counts.

Definition at line 68 of file base_types.h.