10 // A pill is a unit of entropy.
16 bool operator==(Pill
const& that
) const { return this->s_
== that
.s_
; }
17 bool operator!=(Pill
const& that
) const { return !(*this == that
); }
19 std::string_view
as_string_view() const
21 return std::string_view
{b32_str_
, strlen(b32_str_
)};
25 unsigned long long s_
;
27 auto static constexpr b32_ndigits_
= ((sizeof(s_
) * CHAR_BIT
) + 4) / 5;
28 char b32_str_
[b32_ndigits_
+ 1];
30 friend std::ostream
& operator<<(std::ostream
& s
, Pill
const& p
)
32 return s
<< p
.b32_str_
;
36 #endif // PILL_DOT_HPP