File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
include/boost/math/ccmath Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 14
14
namespace boost ::math::ccmath {
15
15
16
16
template <typename T>
17
- inline constexpr bool isinf (T x)
17
+ constexpr bool isinf (T x) noexcept
18
18
{
19
19
if (BOOST_MATH_IS_CONSTANT_EVALUATED (x))
20
20
{
21
- return x == std::numeric_limits<T>::infinity () || -x == std::numeric_limits<T>::infinity ();
21
+ if constexpr (std::numeric_limits<T>::is_signed)
22
+ {
23
+ return x == std::numeric_limits<T>::infinity () || -x == std::numeric_limits<T>::infinity ();
24
+ }
25
+ else
26
+ {
27
+ return x == std::numeric_limits<T>::infinity ();
28
+ }
22
29
}
23
30
else
24
31
{
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ inline constexpr T logb_impl(T arg) noexcept
29
29
int exp = 0 ;
30
30
boost::math::ccmath::frexp (arg, &exp);
31
31
32
- return exp - 1 ;
32
+ return static_cast <T>( exp - 1 ) ;
33
33
}
34
34
35
35
} // Namespace detail
You can’t perform that action at this time.
0 commit comments