bool IsLitterEndian() { union UTest { std::uint16_t t; std::uint8_t c; } endianTest{ 0x01 }; return (endianTest.c == 0x01); }
C++ 判断系统大小字节序
原文:https://www.cnblogs.com/fluteary/p/9178627.html