struct usize
Declaration
struct usize { /* full declaration omitted */ };
Description
An address-sized unsigned integer. This type is capable of holding any offset or (positive) distance in a single memory allocation, as allocations are bounded at [`isize::MAX`]($sus::num::isize::MAX). It can represent any absolute address in a linear address system. Note that it is possible for a pointer to be larger than an address under some architectures, with a pointer holding additional data such as capabilities. See [CHERI]( https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-947.pdf) for an example. So this type is not always the same size as a pointer and should not be used to hold a pointer value without acknowledging that it is only the address part of the pointer. See the [namespace level documentation]($sus::num) for more.
Declared at: sus/num/unsigned_integer.h:130
Member Variables
- public ::sus::num::__private::ptr_type< ::sus::mem::size_of<size_t>()>::unsigned_type primitive_value = {0U}
- The inner primitive value. Prefer to cast to the desired primitive type, such as with `uint32_t{n}` for a numeric value `n`.
- public static unsigned long const MIN_PRIMITIVE = __private::min_value<unsigned long>()
- The smallest value that can be represented by an [`
- public static unsigned long const MAX_PRIMITIVE = __private::max_value<unsigned long>()
- The largest value that can be represented by an [`
- public static const sus::num::usize MIN
- The smallest value that can be represented by an [`
- public static const sus::num::usize MAX
- The largest value that can be represented by an [`
- public static const sus::num::u32 BITS
- The size of and [`