LittleEndian

Stores T in little-endian byte order.

Constructors

this
this(T value)
Undocumented in source.

Alias This

_endian_value

Members

Aliases

opAssign
alias opAssign = _endian_value
Undocumented in source.

Properties

_endian_value
T _endian_value [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
_endian_value
T _endian_value [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

t
{
	union U
	{
		BigEndian!ushort be;
		LittleEndian!ushort le;
		ubyte[2] bytes;
	}
	U u;

	u.be = 0x1234;
	assert(u.bytes == [0x12, 0x34]);

	u.le = 0x1234;
	assert(u.bytes == [0x34, 0x12]);

	u.bytes = [0x56, 0x78];
	assert(u.be == 0x5678);
	assert(u.le == 0x7856

Meta