From 89624beacd9becff81f28a0f9011f708fc784d42 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 13 Jan 2024 14:10:14 +0100 Subject: c --- serialize/packbits.cpp | 2 ++ 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{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 template struct next { - static_assert(!std::is_same_v, "reading past the end"); - static_assert( std::is_same_v, "reading past the end"); + static_assert(N == 0, "reading past the end"); + static_assert(N != 0, "reading past the end"); }; }; -- cgit v1.2.3