19 public boost::equality_comparable<IntX>,
20 public boost::equality_comparable<IntX, std::uintmax_t>
23 using integer_type = std::uintmax_t;
24 constexpr IntX() : m_value(0) {}
25 constexpr explicit IntX(integer_type x) : m_value(x) {}
27 void set(integer_type x);
28 constexpr integer_type get()
const {
return m_value; }
30 constexpr bool operator==(
const IntX& other)
const
32 return m_value == other.m_value;
35 constexpr bool operator==(integer_type other)
const
37 return m_value == other;
40 ByteBuffer encode()
const;
41 static boost::optional<IntX> decode(
const ByteBuffer&);