xentara-utils v2.0.4
The Xentara Utility Library
Loading...
Searching...
No Matches
xentara::utils::memory::ByteOffset< Offset > Class Template Reference

A byte offset that can be used for byte-based pointer arithmetic This class A number that can be added to or subtracted from a pointer to move it by the corresponding number of bytes, as opposed to element. Also works on void pointers. More...

#include <xentara/utils/memory/ByteOffset.hpp>

Public Member Functions

constexpr ByteOffset (Offset offset) noexcept
 Constructor.
 

Related Symbols

(Note that these are not member symbols.)

template<typename Type , xentara::utils::tools::Integral Offset>
auto operator+= (Type *&pointer, xentara::utils::memory::ByteOffset< Offset > offset) noexcept -> Type *&
 Addition assignment operator for pointers.
 
template<typename Type , xentara::utils::tools::Integral Offset>
auto operator-= (Type *&pointer, xentara::utils::memory::ByteOffset< Offset > offset) noexcept -> Type *&
 Subtraction assignment operator for pointers.
 

Detailed Description

template<tools::Integral Offset>
class xentara::utils::memory::ByteOffset< Offset >

A byte offset that can be used for byte-based pointer arithmetic This class A number that can be added to or subtracted from a pointer to move it by the corresponding number of bytes, as opposed to element. Also works on void pointers.

Constructor & Destructor Documentation

◆ ByteOffset()

template<tools::Integral Offset>
constexpr xentara::utils::memory::ByteOffset< Offset >::ByteOffset ( Offset  offset)
explicitconstexprnoexcept

Constructor.

Friends And Related Symbol Documentation

◆ operator+=()

template<typename Type , xentara::utils::tools::Integral Offset>
auto operator+= ( Type *&  pointer,
xentara::utils::memory::ByteOffset< Offset >  offset 
) -> Type *&
related

Addition assignment operator for pointers.

◆ operator-=()

template<typename Type , xentara::utils::tools::Integral Offset>
auto operator-= ( Type *&  pointer,
xentara::utils::memory::ByteOffset< Offset >  offset 
) -> Type *&
related

Subtraction assignment operator for pointers.