VBVX 0.1.0
Header-only C++23 library for safe, zero-copy parsing of packet buffers.
Loading...
Searching...
No Matches
utils.hxx File Reference
#include <bit>
#include <concepts>
#include <cstdint>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  vbvx

Functions

template<typename _Tp>
constexpr _Tp vbvx::autoswap (_Tp tp)
 Byte-swap a value if the host is little-endian.
template<typename _Tp>
constexpr _Tp vbvx::read_from_bytes (const uint8_t *src)
 Read a trivially copyable type from a byte array.