3#define MSGPACK_NO_BOOST
14 if (o.type == msgpack::type::POSITIVE_INTEGER) {
16 }
else if (o.type == msgpack::type::STR) {
21 if (o.via.str.size > 39) {
22 throw_or_abort(
"uint128_t deserialization failed: string too long");
25 for (
size_t i = 0; i < o.via.str.size; ++i) {
26 char c = o.via.str.ptr[i];
27 if (c <
'0' || c >
'9') {
28 throw_or_abort(
"uint128_t deserialization failed: Non-digit character in input");
31 result = result * 10 + (
static_cast<uint128_t>(c -
'0'));
constexpr std::array< uint8_t, S > convert(const std::string_view &in)
unsigned __int128 uint128_t
msgpack::object const & operator()(msgpack::object const &o, uint128_t &v) const
void throw_or_abort(std::string const &err)