diff --git a/include/boost/multiprecision/detail/default_ops.hpp b/include/boost/multiprecision/detail/default_ops.hpp index c5e616be1..0137b8f43 100644 --- a/include/boost/multiprecision/detail/default_ops.hpp +++ b/include/boost/multiprecision/detail/default_ops.hpp @@ -3045,6 +3045,7 @@ sqrt(const number& x, number& r) return s; } +// clang-format off #define UNARY_OP_FUNCTOR(func, category) \ namespace detail { \ template \ @@ -3072,23 +3073,23 @@ sqrt(const number& x, number& r) inline typename enable_if_c >::value == category, \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - detail::expression >> ::type \ + detail::expression > > ::type \ func(const detail::expression& arg) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - detail::expression> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type > (), arg); \ + detail::expression > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type > (), arg); \ } \ template \ inline typename enable_if_c::value == category, \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number >> ::type \ + number > > ::type \ func(const number& arg) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg); \ + number > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg); \ } \ template \ inline typename boost::enable_if_c< \ @@ -3162,55 +3163,55 @@ sqrt(const number& x, number& r) inline typename enable_if_c::value == category, \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number, number >> ::type \ + number, number > > ::type \ func(const number& arg, const number& a) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number, number> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ + number, number > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ } \ template \ inline typename enable_if_c< \ (number_category::value == category) && (boost::is_convertible::result_type, number >::value), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number, detail::expression >> ::type \ + number, detail::expression > > ::type \ func(const number& arg, const detail::expression& a) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number, detail::expression> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ + number, detail::expression > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ } \ template \ inline typename enable_if_c< \ (number_category::value == category) && (boost::is_convertible::result_type, number >::value), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - detail::expression, number >> ::type \ + detail::expression, number > > ::type \ func(const detail::expression& arg, const number& a) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - detail::expression, number> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ + detail::expression, number > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ } \ template \ inline typename enable_if_c< \ (number_category >::value == category) && (number_category >::value == category), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - detail::expression, detail::expression >> ::type \ + detail::expression, detail::expression > > ::type \ func(const detail::expression& arg, const detail::expression& a) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - detail::expression, detail::expression> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type > (), arg, a); \ + detail::expression, detail::expression > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type > (), arg, a); \ } \ template \ inline typename enable_if_c< \ is_compatible_arithmetic_type >::value && (number_category::value == category), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number, Arithmetic>> ::type \ + number, Arithmetic> > ::type \ func(const number& arg, const Arithmetic& a) \ { \ return detail::expression< \ @@ -3222,7 +3223,7 @@ sqrt(const number& x, number& r) is_compatible_arithmetic_type::result_type>::value && (number_category >::value == category), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - detail::expression, Arithmetic>> ::type \ + detail::expression, Arithmetic> > ::type \ func(const detail::expression& arg, const Arithmetic& a) \ { \ return detail::expression< \ @@ -3234,24 +3235,24 @@ sqrt(const number& x, number& r) is_compatible_arithmetic_type >::value && (number_category::value == category), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - Arithmetic, number >> ::type \ + Arithmetic, number > > ::type \ func(const Arithmetic& arg, const number& a) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - Arithmetic, number> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ + Arithmetic, number > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend > (), arg, a); \ } \ template \ inline typename enable_if_c< \ is_compatible_arithmetic_type::result_type>::value && (number_category >::value == category), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - Arithmetic, detail::expression >> ::type \ + Arithmetic, detail::expression > > ::type \ func(const Arithmetic& arg, const detail::expression& a) \ { \ return detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - Arithmetic, detail::expression> (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type > (), arg, a); \ + Arithmetic, detail::expression > (detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type > (), arg, a); \ } \ template \ inline typename enable_if_c<(number_category::value == category), \ @@ -3298,7 +3299,7 @@ sqrt(const number& x, number& r) (number_category >::value == category), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < typename detail::backend_type >::type>, \ - detail::expression, Arg2>> ::type \ + detail::expression, Arg2> > ::type \ func(const detail::expression& arg, Arg2 const& a) \ { \ return detail::expression< \ @@ -3310,7 +3311,7 @@ sqrt(const number& x, number& r) (number_category::value == category), \ detail::expression< \ detail::function, detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct)) < Backend>, \ - number, Arg2>> ::type \ + number, Arg2> > ::type \ func(const number& arg, Arg2 const& a) \ { \ return detail::expression< \ @@ -3348,6 +3349,8 @@ sqrt(const number& x, number& r) \ HETERO_BINARY_OP_FUNCTOR_B(func, Arg2, category) +// clang-format on + namespace detail { template struct abs_funct