template <unsigned ORDER>

struct Endian

Defined at line 70 of file ../../third_party/llvm-libc/src/src/__support/endian_internal.h

Converts uint8_t, uint16_t, uint32_t, uint64_t to its big or little endian

counterpart.

We use explicit template specialization:

- to prevent accidental integer promotion.

- to prevent fallback in (unlikely) case of middle-endianness.

Public Members

static const bool IS_LITTLE
static const bool IS_BIG

Public Methods

template <typename T>
T to_big_endian (T value)
template <typename T>
T to_little_endian (T value)