Remove dependency on <cassert>

This commit is contained in:
Victor Zverovich
2019-11-29 08:04:47 -08:00
parent aaf829bfb1
commit 2f9acd1838
5 changed files with 25 additions and 11 deletions

View File

@@ -220,7 +220,9 @@ inline Dest bit_cast(const Source& source) {
inline bool is_big_endian() {
auto u = 1u;
struct bytes { char data[sizeof(u)]; };
struct bytes {
char data[sizeof(u)];
};
return bit_cast<bytes>(u).data[0] == 0;
}