ipmid: message: pack: Fix cast issue

clang-tidy finds an issue related to below line:

    uint64_t bits = t;

where if t is something like unit24_t, it gets compile error:

    /usr/local/include/ipmid/message/pack.hpp:141:18: error: no viable conversion from 'const fixed_uint_t<24U>' (aka 'const number<boost::multiprecision::cpp_int_backend<24U, 24U, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>') to 'uint64_t' (aka 'unsigned long') [clang-diagnostic-error]

Fix it by using static_cast.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I8cda6ec7dc48cab0da38cd1c587eb2da2121d287
diff --git a/include/ipmid/message/pack.hpp b/include/ipmid/message/pack.hpp
index efafd3d..0075000 100644
--- a/include/ipmid/message/pack.hpp
+++ b/include/ipmid/message/pack.hpp
@@ -138,7 +138,9 @@
     {
         size_t count = N;
         static_assert(N <= (details::bitStreamSize - CHAR_BIT));
-        uint64_t bits = t;
+        static_assert(N <= std::numeric_limits<uint64_t>::digits,
+                      "Type exceeds uint64_t limit");
+        uint64_t bits = static_cast<uint64_t>(t);
         while (count > 0)
         {
             size_t appendCount = std::min(count, static_cast<size_t>(CHAR_BIT));