17#ifndef TOOLBOX_UTIL_INTTYPES_HPP
18#define TOOLBOX_UTIL_INTTYPES_HPP
23#include <boost/functional/hash.hpp>
26inline namespace util {
28template <
typename ValueT>
38template <
typename PolicyT>
42 template <
typename RhsT>
43 requires std::convertible_to<RhsT, ValueType>
60 constexpr
ValueType count() const noexcept {
return value_; }
106 value_ &= rhs.value_;
113 value_ |= rhs.value_;
120 value_ ^= rhs.value_;
127 value_ <<= rhs.value_;
134 value_ >>= rhs.value_;
240 template <
typename StreamT>
254static_assert(std::is_standard_layout_v<IntWrapper<Int32Policy>>
255 && std::is_trivial_v<IntWrapper<Int32Policy>>);
260template <
typename ValueT>
263template <
typename PolicyT>
266 boost::hash<typename PolicyT::ValueType>
hasher;
270template <
typename ValueT>
276 return ValueT{UnderlyingTraits::from_string(
sv)};
312template <
typename PolicyT>
316 return wrapper.
count();