Template Function byteswap
Defined in File byteswap.hpp
Function Documentation
-
template<std::integral T>
constexpr T byteswap(T value) noexcept Swap the byte order of a value.
This function swaps the byte order of a given value. If the compiler supports
std::byteswap, the function uses it. Otherwise, it reverses the byte representation manually.- Template Parameters:
T – The type of the value.
- Parameters:
value – The value to swap the byte order of.
- Returns:
The value with the byte order swapped.