Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Public Attributes | List of all members
jau::packed_t< T > Struct Template Reference

Safe access to a pointer cast from unaligned memory via packed attribute, i.e. More...

#include <byte_util.hpp>

Collaboration diagram for jau::packed_t< T >:

Public Member Functions

constexpr T get (const bool littleEndian) const noexcept
 

Public Attributes

store
 

Detailed Description

template<typename T>
struct jau::packed_t< T >

Safe access to a pointer cast from unaligned memory via packed attribute, i.e.

utilizing compiler generated safe load and store operations.

This template shall cause no costs, the cast data pointer is identical to 'T & p = &store'.

Definition at line 559 of file byte_util.hpp.

Member Function Documentation

◆ get()

template<typename T >
constexpr T jau::packed_t< T >::get ( const bool  littleEndian) const
inlineconstexprnoexcept

Definition at line 559 of file byte_util.hpp.

Member Data Documentation

◆ store

template<typename T >
T jau::packed_t< T >::store

Definition at line 559 of file byte_util.hpp.


The documentation for this struct was generated from the following file: