diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-27 19:36:32 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-27 19:36:32 +0200 |
commit | f544cc4c469bd3073e6d78ca05ee70475dfa20cc (patch) | |
tree | 6d1e34ac8e5d586108fd019d4da8f8b043b40cb5 /serialize/binary-serializer.cpp | |
parent | 4dce8e6aeb770fee1a7190526b04d03f3da69cb0 (diff) |
more serializer work
Diffstat (limited to 'serialize/binary-serializer.cpp')
-rw-r--r-- | serialize/binary-serializer.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/serialize/binary-serializer.cpp b/serialize/binary-serializer.cpp index 08606768..1a6da0fd 100644 --- a/serialize/binary-serializer.cpp +++ b/serialize/binary-serializer.cpp @@ -74,13 +74,7 @@ static constexpr bool test2() } static_assert(test2()); -template<typename T> -[[maybe_unused]] static constexpr T maybe_byteswap(T x) -{ - if constexpr(std::endian::native == std::endian::big) - return std::byteswap(x); - else - return x; -} +using test3 = binary_reader<std::array<char, 1>::iterator>; +static_assert(std::is_same_v<test3&, decltype( std::declval<test3&>() >> std::declval<int&>() )>); } // namespace floormat::Serialize |