clang didn't like constexpr is_big/little_endian checks

This commit is contained in:
Noel Berry 2022-02-12 23:15:51 -08:00
parent 83edcb06c2
commit cbb194e516

View File

@ -75,10 +75,10 @@ namespace Blah
} }
} }
constexpr bool is_big_endian() { return (*((short*)"AB") == 0x4243); } inline bool is_big_endian() { return (*((short*)"AB") == 0x4243); }
constexpr bool is_little_endian() { return (*((short*)"AB") != 0x4243); } inline bool is_little_endian() { return (*((short*)"AB") != 0x4243); }
constexpr bool is_endian(const Endian& endian) inline bool is_endian(const Endian& endian)
{ {
return return
(endian == Endian::Little && is_little_endian()) || (endian == Endian::Little && is_little_endian()) ||