Reverses the bytes in the given integer value V.

Synopsis

Declared in <llvm/ADT/bit.h>

template<typename T>
requires std::is_integral_v<T>
[[nodiscard]]
constexpr
T
byteswap(T V) noexcept;

Return Value

Integer of the same type with bytes in reverse order.

Note

The return value should not be discarded.

Parameters

Name

Description

V

Integer value whose bytes are reversed.

Created with MrDocs