carb::cpp::endian

Defined in carb/cpp/Bit.h

enum class carb::cpp::endian

Indicates the endianness of all scalar types for the current system.

Endianness refers to byte ordering of scalar types larger than one byte. Take for example a 32-bit scalar with the value “1”. On a little-endian system, the least-significant (“littlest”) bytes are ordered first in memory. “1” would be represented as:

01 00 00 00

On a big-endian system, the most-significant (“biggest”) bytes are ordered first in memory. “1” would be represented as:

00 00 00 01

Values:

enumerator little

An implementation-defined value representing little-endian scalar types.

enumerator big

An implementation-defined value representing big-endian scalar types.

enumerator native

Will be either endian::little or endian::big depending on the target platform.