2#include <UnCompute/Base/Flags.h>
8 enum class Byte : UInt8
12 static_assert(
sizeof(Byte) == 1);
16 inline std::enable_if_t<std::is_integral_v<T>, Byte*> un_byte_cast(T* ptr)
18 return reinterpret_cast<Byte*
>(ptr);
23 inline std::enable_if_t<std::is_integral_v<T>,
const Byte*> un_byte_cast(
const T* ptr)
25 return reinterpret_cast<const Byte*
>(ptr);
28 template<
class TOStream>
29 inline TOStream& operator<<(TOStream& stream, Byte
byte)
31 return stream <<
"0x" << std::setfill(
'0') << std::setw(2) << std::right << std::hex << static_cast<Int32>(
byte);