MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

Functions
Cast.hxx File Reference
`#include "Compiler.h"`
`#include <stddef.h>`
Include dependency graph for Cast.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions
static constexpr void * | OffsetPointer (void *p, ptrdiff_t offset)
| Offset the given pointer by the specified number of bytes. More...
static constexpr const void * | OffsetPointer (const void *p, ptrdiff_t offset)
| Offset the given pointer by the specified number of bytes. More...
template<typename T , typename U >
static constexpr T * | OffsetCast (U *p, ptrdiff_t offset)
template<typename T , typename U >
static constexpr T * | OffsetCast (const U *p, ptrdiff_t offset)
template<class C , class A >
static constexpr ptrdiff_t | ContainerAttributeOffset (const C *null_c, const A C::*p)
template<class C , class A >
static constexpr ptrdiff_t | ContainerAttributeOffset (const A C::*p)
template<class C , class A >
static C & | ContainerCast (A &a, A C::*member)
| Cast the given pointer to a struct member to its parent structure. More...
template<class C , class A >
static const C & | ContainerCast (const A &a, A C::*member)
| Cast the given pointer to a struct member to its parent structure. More...

## Function Documentation

template<class C , class A >

static constexpr ptrdiff_t ContainerAttributeOffset | ( | const C * | null_c,
|  | const A C::* | p
| ) |  |
| inline static

Definition at line 71 of file Cast.hxx.

template<class C , class A >

static constexpr ptrdiff_t ContainerAttributeOffset | ( | const A C::* | p | ) |
| inline static

Definition at line 78 of file Cast.hxx.

template<class C , class A >

static C& ContainerCast | ( | A & | a,
|  | A C::* | member
| ) |  |
| inline static

Cast the given pointer to a struct member to its parent structure.

Definition at line 91 of file Cast.hxx.

template<class C , class A >

static const C& ContainerCast | ( | const A & | a,
|  | A C::* | member
| ) |  |
| inline static

Cast the given pointer to a struct member to its parent structure.

Definition at line 104 of file Cast.hxx.

template<typename T , typename U >

static constexpr T* OffsetCast | ( | U * | p,
|  | ptrdiff_t | offset
| ) |  |
| inline static

Definition at line 57 of file Cast.hxx.

template<typename T , typename U >

static constexpr T* OffsetCast | ( | const U * | p,
|  | ptrdiff_t | offset
| ) |  |
| inline static

Definition at line 64 of file Cast.hxx.

static constexpr void* OffsetPointer | ( | void * | p,
|  | ptrdiff_t | offset
| ) |  |
| inline static

Offset the given pointer by the specified number of bytes.

Definition at line 41 of file Cast.hxx.

static constexpr const void* OffsetPointer | ( | const void * | p,
|  | ptrdiff_t | offset
| ) |  |
| inline static

Offset the given pointer by the specified number of bytes.

Definition at line 50 of file Cast.hxx.