[ox/std] Add raw to byteswap type

This commit is contained in:
Gary Talent 2019-03-16 14:51:09 -05:00
parent 9f805f761d
commit 585ff0a1fe

View File

@ -174,6 +174,15 @@ class __attribute__((packed)) ByteSwapInteger {
return newVal;
}
/**
* Returns the integer as it is stored. If it is stored as little endian,
* a little endian integer is returned regardless of the endianness of
* the system.
*/
constexpr auto raw() noexcept -> T {
return m_value;
}
};
template<typename T>