diff options
-rw-r--r-- | serialize/packbits.cpp | 2 | ||||
-rw-r--r-- | serialize/packbits.hpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/serialize/packbits.cpp b/serialize/packbits.cpp index 4623d0d9..83828f66 100644 --- a/serialize/packbits.cpp +++ b/serialize/packbits.cpp @@ -7,6 +7,8 @@ using namespace floormat::detail_Pack; namespace { +static_assert(!Storage<uint8_t, 0>{42}.check_zero()); + constexpr bool test1() { constexpr size_t bits[] = { 5, 2, 1 }; diff --git a/serialize/packbits.hpp b/serialize/packbits.hpp index e730770f..cb91602f 100644 --- a/serialize/packbits.hpp +++ b/serialize/packbits.hpp @@ -78,8 +78,8 @@ struct Storage<T, 0> template<size_t N> struct next { - static_assert(!std::is_same_v<T, void>, "reading past the end"); - static_assert( std::is_same_v<T, void>, "reading past the end"); + static_assert(N == 0, "reading past the end"); + static_assert(N != 0, "reading past the end"); }; }; |