E-MailRelay

Classes | Namespaces | Functions
galign.h File Reference
`#include "gdef.h"`
`#include <memory>`

Go to the source code of this file.

## Classes
struct | G::AlignImp::log2of< N >
| Evaluates the number of bits in the template parameter N. More...
struct | G::AlignImp::log2of< 1U >
| Terminal specialisation of log2of<N>. More...

## Namespaces
namespace | G
| Low-level classes.
namespace | G::AlignImp
| An implementation namespace for G::align().

## Functions
template<typename Talign , typename Tvalue >
constexpr Tvalue | G::AlignImp::mask (Tvalue n)
template<typename Talign , typename Tvalue >
constexpr Tvalue | G::AlignImp::shift (Tvalue n)
template<typename Talign , typename Tchar >
void * | G::AlignImp::align_imp (const Tchar *p, const std::size_t n_in)
template<typename T >
void * | G::align (const char *buffer, std::size_t buffer_size)
| Returns a pointer inside the given buffer that is aligned for values of type T. More...
template<typename T >
void * | G::align (const unsigned char *buffer, std::size_t buffer_size)
| Returns a pointer inside the given unsigned-char buffer that is aligned for values of type T. More...
template<typename T >
constexpr std::size_t | G::align_shift (std::size_t n)
| Divides the number of bytes in a range to give the number of whole Ts. More...
template<typename T >
constexpr std::size_t | G::align_mask (std::size_t n)
| Rounds down the number of bytes in a range to give a number of bytes that will hold an exact number of Ts. More...