Ticket #8872: boost-1.54.0-multiprecision-unused_typedef.patch

File boost-1.54.0-multiprecision-unused_typedef.patch, 8.8 KB (added by Petr Machata <pmachata@…>, 9 years ago)

A fix.

  • boost_1_54_0/boost/multiprecision/detail/functions/constants.hpp

    diff -up boost_1_54_0/boost/multiprecision/detail/functions/constants.hpp~ boost_1_54_0/boost/multiprecision/detail/functions/constants.hpp
    old new template <class T>  
    8181void calc_e(T& result, unsigned digits)
    8282{
    8383   typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
    84    typedef typename mpl::front<typename T::float_types>::type real_type;
    8584   //
    8685   // 1100 digits in string form:
    8786   //
  • boost_1_54_0/boost/multiprecision/detail/functions/pow.hpp

    diff -up boost_1_54_0/boost/multiprecision/detail/functions/pow.hpp~ boost_1_54_0/boost/multiprecision/detail/functions/pow.hpp
    old new void hyp1F0(T& H1F0, const T& a, const T  
    142142   // There are no checks on input range or parameter boundaries.
    143143
    144144   typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
    145    typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
    146    typedef typename T::exponent_type exp_type;
    147    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    148    typedef typename mpl::front<typename T::float_types>::type fp_type;
    149145
    150146   BOOST_ASSERT(&H1F0 != &x);
    151147   BOOST_ASSERT(&H1F0 != &a);
    void eval_exp(T& result, const T& x)  
    200196   typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
    201197   typedef typename T::exponent_type exp_type;
    202198   typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    203    typedef typename boost::multiprecision::detail::canonical<float, T>::type float_type;
    204199
    205200   // Handle special arguments.
    206201   int type = eval_fpclassify(x);
    void eval_log(T& result, const T& arg)  
    326321   // then let y = x - 1 and compute:
    327322   // log(x) = log(2) * n + log1p(1 + y)
    328323   //
    329    typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
    330324   typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
    331325   typedef typename T::exponent_type exp_type;
    332326   typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    inline void eval_pow(T& result, const T&  
    409403{
    410404   BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The pow function is only valid for floating point types.");
    411405   typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
    412    typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
    413    typedef typename T::exponent_type exp_type;
    414    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    415406   typedef typename mpl::front<typename T::float_types>::type fp_type;
    416407
    417408   if((&result == &x) || (&result == &a))
    namespace detail{  
    595586   template <class T>
    596587   void sinhcosh(const T& x, T* p_sinh, T* p_cosh)
    597588   {
    598       typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
    599589      typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
    600       typedef typename T::exponent_type exp_type;
    601       typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    602590      typedef typename mpl::front<typename T::float_types>::type fp_type;
    603591
    604592      switch(eval_fpclassify(x))
  • boost_1_54_0/boost/multiprecision/detail/functions/trig.hpp

    diff -up boost_1_54_0/boost/multiprecision/detail/functions/trig.hpp~ boost_1_54_0/boost/multiprecision/detail/functions/trig.hpp
    old new void hyp0F1(T& result, const T& b, const  
    1717{
    1818   typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type;
    1919   typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
    20    typedef typename T::exponent_type exp_type;
    21    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    22    typedef typename mpl::front<typename T::float_types>::type fp_type;
    2320
    2421   // Compute the series representation of Hypergeometric0F1 taken from
    2522   // http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric0F1/06/01/01/
    void eval_sin(T& result, const T& x)  
    8279
    8380   typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type;
    8481   typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
    85    typedef typename T::exponent_type exp_type;
    86    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    8782   typedef typename mpl::front<typename T::float_types>::type fp_type;
    8883
    8984   switch(eval_fpclassify(x))
    void eval_cos(T& result, const T& x)  
    228223
    229224   typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type;
    230225   typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
    231    typedef typename T::exponent_type exp_type;
    232    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    233226   typedef typename mpl::front<typename T::float_types>::type fp_type;
    234227
    235228   switch(eval_fpclassify(x))
    void hyp2F1(T& result, const T& a, const  
    381374  // Abramowitz and Stegun 15.1.1.
    382375  // There are no checks on input range or parameter boundaries.
    383376
    384    typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type;
    385377   typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
    386    typedef typename T::exponent_type exp_type;
    387    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    388    typedef typename mpl::front<typename T::float_types>::type fp_type;
    389378
    390379   T x_pow_n_div_n_fact(x);
    391380   T pochham_a         (a);
    template <class T>  
    443432void eval_asin(T& result, const T& x)
    444433{
    445434   BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The asin function is only valid for floating point types.");
    446    typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type;
    447435   typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
    448    typedef typename T::exponent_type exp_type;
    449    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    450436   typedef typename mpl::front<typename T::float_types>::type fp_type;
    451437
    452438   if(&result == &x)
    void eval_atan(T& result, const T& x)  
    597583   BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The atan function is only valid for floating point types.");
    598584   typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type;
    599585   typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
    600    typedef typename T::exponent_type exp_type;
    601    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    602586   typedef typename mpl::front<typename T::float_types>::type fp_type;
    603587
    604588   switch(eval_fpclassify(x))
    void eval_atan2(T& result, const T& y, c  
    699683      return;
    700684   }
    701685
    702    typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type;
    703686   typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
    704    typedef typename T::exponent_type exp_type;
    705    typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
    706    typedef typename mpl::front<typename T::float_types>::type fp_type;
    707687
    708688   switch(eval_fpclassify(y))
    709689   {
  • boost_1_54_0/boost/multiprecision/detail/generic_interconvert.hpp

    diff -up boost_1_54_0/boost/multiprecision/detail/generic_interconvert.hpp~ boost_1_54_0/boost/multiprecision/detail/generic_interconvert.hpp
    old new void generic_interconvert(To& to, const  
    191191template <class To, class From>
    192192void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_rational>& /*from_type*/)
    193193{
    194    typedef typename component_type<number<From> >::type   from_component_type;
    195194   typedef typename component_type<number<To> >::type     to_component_type;
    196195
    197196   number<From> t(from);