UNISTDX_NET_BYTE_SWAP
byte_swap< u64 >(u64 n) -> constexpr u64

Specialisation for 8-byte unsigned integer.

template <class T>
byte_swap(T n) -> T

Byte-swapping function.

  • There are specialisations for standard unsigned integer types.
  • Specialisations are compile-time where supported.

byte_swap< u16 >(u16 n) -> constexpr u16

Specialisation for 2-byte unsigned integer.

byte_swap(u128 x) -> u128

Specialisation for 16-byte unsigned integer.

byte_swap(unsigned __int128 x) -> unsigned __int128

Specialisation for built-in 16-byte unsigned integer.

byte_swap< u32 >(u32 n) -> constexpr u32

Specialisation for 4-byte unsigned integer.

byte_swap< u8 >(u8 n) -> constexpr u8

Specialisation for 1-byte unsigned integer.