[ox/std] Add raw to byteswap type

(synced from 585ff0a1fe)
This commit is contained in:
2019-03-16 14:51:09 -05:00
parent 4b440b3c69
commit 3f71959735
+9
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>