OpenVPN 3 Core Library
Loading...
Searching...
No Matches
alignment.hpp File Reference
#include <cstring>
#include <type_traits>
Include dependency graph for alignment.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openvpn
 

Functions

template<typename T , typename = std::enable_if_t<std::is_trivially_copyable<T>::value>>
openvpn::alignment_safe_extract (const void *toAlign) noexcept
 Converts a byte buffer to the desired type, avoiding undefined behavior due to alignment.