file
common.hpp
Functions
-
template<class T, class M>static auto offset_of_impl(const M T::* member) -> ptrdiff_t constexpr
-
template<class T, class M>static auto container_of_impl(M* ptr, const M T::* member) -> T* constexpr
Variables
-
template<class ContainerType>concept Container
Defines
- #define UNUSED(_var)
- #define ARR_SIZE(_arr)
- #define OFFSET_OF(_type, _member)
- #define CONTAINER_OF(_ptr, _type, _member)
- #define ALIGN(n)
- #define CACHE_ALIGN
Function documentation
template<class T, class M>
static ptrdiff_t offset_of_impl(const M T::* member) constexpr
Get the container of a pointer to a member.
Define documentation
#define UNUSED(_var)
Mark a variable as unused.
#define ARR_SIZE(_arr)
Get the size of a stack-allocated array.