Ticket #6169: patch-against-1.48.0.patch

File patch-against-1.48.0.patch, 3.8 KB (added by Chris Moore <cmoore@…>, 11 years ago)

Patch against 1.48.0 that fixes the example for me.

  • boost/integer.hpp

    diff -dur boost_1_48_0_clean/boost/integer.hpp boost_1_48_0/boost/integer.hpp
    old new  
    5454
    5555  //  specializatons: 1=long, 2=int, 3=short, 4=signed char,
    5656  //     6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char
    57   //  no specializations for 0 and 5: requests for a type > long are in error
     57  //  no specializations for 0 and 6: requests for a type > long are in error
    5858#ifdef BOOST_HAS_LONG_LONG
    5959  template<> struct int_least_helper<1> { typedef boost::long_long_type least; };
    6060#elif defined(BOOST_HAS_MS_INT64)
    … …  
    6565  template<> struct int_least_helper<4> { typedef short least; };
    6666  template<> struct int_least_helper<5> { typedef signed char least; };
    6767#ifdef BOOST_HAS_LONG_LONG
    68   template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; };
     68  template<> struct int_least_helper<7> { typedef boost::ulong_long_type least; };
    6969#elif defined(BOOST_HAS_MS_INT64)
    70   template<> struct int_least_helper<6> { typedef unsigned __int64 least; };
     70  template<> struct int_least_helper<7> { typedef unsigned __int64 least; };
    7171#endif
    72   template<> struct int_least_helper<7> { typedef unsigned long least; };
    73   template<> struct int_least_helper<8> { typedef unsigned int least; };
    74   template<> struct int_least_helper<9> { typedef unsigned short least; };
    75   template<> struct int_least_helper<10> { typedef unsigned char least; };
     72  template<> struct int_least_helper<8> { typedef unsigned long least; };
     73  template<> struct int_least_helper<9> { typedef unsigned int least; };
     74  template<> struct int_least_helper<10> { typedef unsigned short least; };
     75  template<> struct int_least_helper<11> { typedef unsigned char least; };
    7676
    7777  template <int Bits>
    7878  struct exact_signed_base_helper{};
    … …  
    133133#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
    134134     // It's really not clear why this workaround should be needed... shrug I guess!  JM
    135135     BOOST_STATIC_CONSTANT(int, s =
    136            6 +
     136           7 +
    137137          (Bits <= ::std::numeric_limits<unsigned long>::digits) +
    138138          (Bits <= ::std::numeric_limits<unsigned int>::digits) +
    139139          (Bits <= ::std::numeric_limits<unsigned short>::digits) +
    … …  
    142142#else
    143143      typedef typename detail::int_least_helper
    144144        <
    145           5 +
     145          6 +
    146146#ifdef BOOST_HAS_LONG_LONG
    147           (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
     147          (Bits <= ::std::numeric_limits<boost::ulong_long_type>::digits) +
    148148#else
    149149           1 +
    150150#endif
    … …  
    217217     // It's really not clear why this workaround should be needed... shrug I guess!  JM
    218218#if defined(BOOST_NO_INTEGRAL_INT64_T)
    219219      BOOST_STATIC_CONSTANT(unsigned, which =
    220            6 +
     220           7 +
    221221          (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
    222222          (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
    223223          (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
    … …  
    225225      typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
    226226#else // BOOST_NO_INTEGRAL_INT64_T
    227227      BOOST_STATIC_CONSTANT(unsigned, which =
    228            5 +
     228           6 +
    229229          (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
    230230          (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
    231231          (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
    … …  
    236236#else
    237237      typedef typename detail::int_least_helper
    238238        <
    239           5 +
     239          6 +
    240240#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
    241241          (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
    242242#else