diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-14 14:55:25 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-14 14:55:25 +0100 |
commit | 9b957f519620a07597fa28f796c09bdbef2e8fab (patch) | |
tree | 5d4e086f8d2a0c6ab74027572cfdea0288378013 /serialize/packbits.cpp | |
parent | 9b8fb9c6099630e404df5dd976f3f1fa185470cc (diff) |
aa
Diffstat (limited to 'serialize/packbits.cpp')
-rw-r--r-- | serialize/packbits.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/serialize/packbits.cpp b/serialize/packbits.cpp index c908634b..6ed898c7 100644 --- a/serialize/packbits.cpp +++ b/serialize/packbits.cpp @@ -9,7 +9,13 @@ namespace { template<size_t Val> using us_bits = Bits_<uint16_t, Val>; -static_assert(!Storage<uint8_t, 0>{42}.check_zero()); +static_assert(!Storage<uint32_t, 3>{65535}.check_zero()); +static_assert(Storage<uint32_t, 30>{65535}.advance<16>() == 0); + +static_assert(Storage<uint32_t, 30>::next<16>{ + Storage<uint32_t, 30>{65535}.advance<16>() +}.check_zero()); +static_assert(Storage<uint32_t, 30>::next<16>{}.Capacity == 14); constexpr bool test1() { @@ -100,6 +106,16 @@ constexpr bool test3() } static_assert(test3()); +static_assert(std::is_same_v< make_tuple_type<uint8_t, 3>, std::tuple<uint8_t, uint8_t, uint8_t> >); + +constexpr bool test4() +{ + auto t = std::tuple<unsigned, unsigned, unsigned>(); + + return true; +} +static_assert(test4()); + } // namespace } // namespace floormat |