summaryrefslogtreecommitdiffhomepage
path: root/serialize/packbits-write.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'serialize/packbits-write.hpp')
-rw-r--r--serialize/packbits-write.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/serialize/packbits-write.hpp b/serialize/packbits-write.hpp
index c62b8e39..8bcd14af 100644
--- a/serialize/packbits-write.hpp
+++ b/serialize/packbits-write.hpp
@@ -56,20 +56,22 @@ struct output_field
static constexpr size_t Length = LENGTH;
};
-template<std::unsigned_integral Type, typename Tuple> struct count_bits;
+template<std::unsigned_integral Type, typename Tuple> struct count_bits_;
-template<std::unsigned_integral Int, size_t N, typename... Ts> struct count_bits<Int, std::tuple<output_field<Int, N>, Ts...>>
+template<std::unsigned_integral Int, size_t N, typename... Ts> struct count_bits_<Int, std::tuple<output_field<Int, N>, Ts...>>
{
- static constexpr size_t length = N + count_bits<Int, std::tuple<Ts...>>::length;
+ static constexpr size_t length = N + count_bits_<Int, std::tuple<Ts...>>::length;
static_assert(length <= sizeof(Int)*8);
};
-template<std::unsigned_integral Int> struct count_bits<Int, std::tuple<>>
+template<std::unsigned_integral Int> struct count_bits_<Int, std::tuple<>>
{
static constexpr size_t length = 0;
};
+template<typename T, typename Tuple> constexpr inline size_t count_bits = count_bits_<T, Tuple>::length;
+
template <std::size_t ... Is>
constexpr std::index_sequence<sizeof...(Is)-1uz-Is...> reverse_index_sequence(std::index_sequence<Is...> const&);