17#ifndef TOOLBOX_UTIL_INTTYPES_HPP
18#define TOOLBOX_UTIL_INTTYPES_HPP
22#include <boost/functional/hash.hpp>
25inline namespace util {
27template <
typename ValueT>
37template <
typename PolicyT>
41 template <
typename RhsT>
42 requires std::convertible_to<RhsT, ValueType>
59 constexpr
ValueType count() const noexcept {
return value_; }
105 value_ &= rhs.value_;
112 value_ |= rhs.value_;
119 value_ ^= rhs.value_;
126 value_ <<= rhs.value_;
133 value_ >>= rhs.value_;
241 return os << rhs.value_;
250static_assert(std::is_standard_layout_v<IntWrapper<Int32Policy>>
251 && std::is_trivial_v<IntWrapper<Int32Policy>>);
256template <
typename ValueT>
259template <
typename PolicyT>
262 boost::hash<typename PolicyT::ValueType>
hasher;
266template <
typename ValueT>
272 return ValueT{UnderlyingTraits::from_string(
sv)};
308template <
typename PolicyT>
312 return wrapper.
count();