WPILibC++ 2024.1.1-beta-4
wpi::PointerLikeTypeTraits< void * > Struct Reference

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/PointerLikeTypeTraits.h>

Static Public Member Functions

static void * getAsVoidPointer (void *P)
 
static void * getFromVoidPointer (void *P)
 

Static Public Attributes

static constexpr int NumLowBitsAvailable = 2
 Note, we assume here that void* is related to raw malloc'ed memory and that malloc returns objects at least 4-byte aligned. More...
 

Member Function Documentation

◆ getAsVoidPointer()

static void * wpi::PointerLikeTypeTraits< void * >::getAsVoidPointer ( void *  P)
inlinestatic

◆ getFromVoidPointer()

static void * wpi::PointerLikeTypeTraits< void * >::getFromVoidPointer ( void *  P)
inlinestatic

Member Data Documentation

◆ NumLowBitsAvailable

constexpr int wpi::PointerLikeTypeTraits< void * >::NumLowBitsAvailable = 2
staticconstexpr

Note, we assume here that void* is related to raw malloc'ed memory and that malloc returns objects at least 4-byte aligned.

However, this may be wrong, or pointers may be from something other than malloc. In this case, you should specify a real typed pointer or avoid this template.

All clients should use assertions to do a run-time check to ensure that this is actually true.


The documentation for this struct was generated from the following file: