From cf77a491c0f0cb85e4beeb4780c8413a914abccd Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:33:11 -0400 Subject: [PATCH] ten should be a constexpr as a float Its int counterpart is a constexpr, and the ten variable never changes, so for consistency, we should make float_type ten constexpr as welll. --- include/boost/math/cstdfloat/cstdfloat_iostream.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/math/cstdfloat/cstdfloat_iostream.hpp b/include/boost/math/cstdfloat/cstdfloat_iostream.hpp index c01c236f71..beb56209a9 100644 --- a/include/boost/math/cstdfloat/cstdfloat_iostream.hpp +++ b/include/boost/math/cstdfloat/cstdfloat_iostream.hpp @@ -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); @@ -571,7 +571,7 @@ if((p == static_cast(0U)) || (*p == static_cast(0))) { - return; + return false; } bool is_neg = false;