Skip to content

Commit

Permalink
ten should be a constexpr as a float
Browse files Browse the repository at this point in the history
Its int counterpart is a constexpr, and the ten variable never changes, so for consistency, we should make float_type ten constexpr as welll.
  • Loading branch information
AZero13 committed Oct 14, 2023
1 parent 10857c0 commit cf77a49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/math/cstdfloat/cstdfloat_iostream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
if(isneg) { x = -x; }

float_type t;
float_type ten = 10;
constexpr float_type ten = 10;

eval_log10(t, x);
eval_floor(t, t);
Expand Down Expand Up @@ -571,7 +571,7 @@

if((p == static_cast<const char*>(0U)) || (*p == static_cast<char>(0)))
{
return;
return false;
}

bool is_neg = false;
Expand Down

0 comments on commit cf77a49

Please sign in to comment.