3#ifndef TETL_NET_BYTE_ORDER_HPP
4#define TETL_NET_BYTE_ORDER_HPP
12constexpr auto ntoh(T) -> T =
delete;
14constexpr auto ntoh(
char v)
noexcept ->
char {
return v; }
24 auto const a = v << 24;
25 auto const b = (v & 0x0000FF00) << 8;
26 auto const c = (v & 0x00FF0000) >> 8;
27 auto const d = v >> 24;
33constexpr auto hton(T) -> T =
delete;
35constexpr auto hton(
char v)
noexcept ->
char {
return v; }
constexpr auto ntoh(T) -> T=delete
constexpr auto hton(T) -> T=delete
TETL_BUILTIN_UINT16 uint16_t
Unsigned integer type with width of exactly 16 bits.
Definition uint_t.hpp:14
TETL_BUILTIN_INT8 int8_t
Signed integer type with width of exactly 8 bits.
Definition int_t.hpp:11
TETL_BUILTIN_UINT8 uint8_t
Unsigned integer type with width of exactly 8 bits.
Definition uint_t.hpp:11
TETL_BUILTIN_UINT32 uint32_t
Unsigned integer type with width of exactly 32 bits.
Definition uint_t.hpp:17