Mjolnir Core
Core functionality of the Mjolnir API
Functions
pointer_operations.h File Reference

Contains multiple utility functions for pointers. More...

#include "mjolnir/core/fundamental_types.h"
#include <cstdint>
Include dependency graph for pointer_operations.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T_Type = void>
auto integer_to_pointer (UPT integer) noexcept -> T_Type *
 Turn an integer into a pointer of the chosen type. More...
 
template<UST t_alignment, typename T_Type >
auto is_aligned (const volatile T_Type *pointer) noexcept -> bool
 Check if a passed pointer is aligned. More...
 
template<typename T_Type >
auto is_aligned (const volatile T_Type *pointer, UST alignment) noexcept -> bool
 Check if a passed pointer is aligned. More...
 
template<UST t_alignment, typename T_Type >
auto misalignment (const volatile T_Type *pointer) noexcept -> UST
 Calculate the misalignment of a pointer. More...
 
template<typename T_Type >
auto misalignment (const volatile T_Type *pointer, UST alignment) noexcept -> UST
 Calculate the misalignment of a pointer. More...
 
template<typename T_Type >
auto pointer_to_integer (const volatile T_Type *pointer) noexcept -> UPT
 Turn a pointer into an integer. More...
 

Detailed Description

Contains multiple utility functions for pointers.

pointer_operations.h