Mercurial > minori
diff include/core/endian.h @ 354:9aaf1e788896
core/endian: fix compile error under clang
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 14 Jul 2024 23:39:42 -0400 |
parents | c844f8bb87ce |
children | 99c961c91809 |
line wrap: on
line diff
--- a/include/core/endian.h Sun Jul 14 23:27:43 2024 -0400 +++ b/include/core/endian.h Sun Jul 14 23:39:42 2024 -0400 @@ -93,7 +93,7 @@ } else if constexpr (std::is_same<T, uint64_t>::value) { return byteswap_64(x); } else { - static_assert(false, "byteswapping with unknown integer type"); + static_assert(!sizeof(T), "invalid integer type given to byteswap"); } }