diff --git a/include/boost/integer/integer_mask.hpp b/include/boost/integer/integer_mask.hpp index 0a092d3..65ee5d5 100644 --- a/include/boost/integer/integer_mask.hpp +++ b/include/boost/integer/integer_mask.hpp @@ -15,6 +15,8 @@ #include // for BOOST_STATIC_CONSTANT #include // for boost::uint_t +#include // for BOOST_HAS_XINT, etc. + #include // for UCHAR_MAX, etc. #include // for std::size_t @@ -84,6 +86,10 @@ BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned int ); BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned long ); #endif +#if BOOST_HAS_XINT && (BOOST_UXINT_MAX > ULONG_MAX) +BOOST_LOW_BITS_MASK_SPECIALIZE( ::boost::detail::uxint_t ); +#endif + #undef BOOST_LOW_BITS_MASK_SPECIALIZE diff --git a/include/boost/integer_fwd.hpp b/include/boost/integer_fwd.hpp index 446ad66..e15385a 100644 --- a/include/boost/integer_fwd.hpp +++ b/include/boost/integer_fwd.hpp @@ -155,6 +155,12 @@ template < > struct low_bits_mask_t< ::std::numeric_limits::digits >; #endif +#if BOOST_HAS_XINT && (BOOST_UXINT_MAX > ULONG_MAX) +template < > + struct low_bits_mask_t< ::std::numeric_limits< ::boost::detail::uxint_t + >::digits >; +#endif + // From ------------------------------------// diff --git a/test/integer_mask_test.cpp b/test/integer_mask_test.cpp index 4444801..99a22b0 100644 --- a/test/integer_mask_test.cpp +++ b/test/integer_mask_test.cpp @@ -8,7 +8,8 @@ // See http://www.boost.org for most recent version including documentation. // Revision History -// 27 Jul 2008 Changed tests to use the unit-test system (Daryle Walker) +// 27 Jul 2008 Changed tests to use the unit-test system; added +// extended-integer support. (Daryle Walker) // 23 Sep 2001 Initial version (Daryle Walker) #define BOOST_TEST_MODULE "Integer mask tests" @@ -16,6 +17,7 @@ #include // for boost::uintmax_t #include // for boost::high_bit_mask_t, etc. +#include // for std::numeric_limits #include // for BOOST_MPL_ASSERT_RELATION #include // for boost::mpl::range_c @@ -30,8 +32,10 @@ namespace boost::uintmax_t const one = 1u; // List the ranges of template parameters tests (ranges are half-open) -typedef boost::mpl::range_c high_bit_offsets; -typedef boost::mpl::range_c low_bit_lengths; +int const max_offset = std::numeric_limits::digits; + +typedef boost::mpl::range_c high_bit_offsets; +typedef boost::mpl::range_c low_bit_lengths; } // unnamed namespace