chsvlib
chsv helper source code

◆ byte_swap() [1/2]

constexpr T Chusov::Memory::byte_swap ( x)
constexprnoexcept

Swaps bytes of the specified object of the standard-layout type T.

Template Parameters
Tis a type of an object specified by the swapped bytes.
Parameters
[in]xis an object specified by the plain sequence of bytes to be swapped.
Returns
A copy of an object which is the result of byte-swapping of x.