[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 3f177433 6/6: Assert a precondition
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 3f177433 6/6: Assert a precondition |
Date: |
Tue, 21 Feb 2023 13:13:19 -0500 (EST) |
branch: master
commit 3f1774331e68069cddf3792214fd923bcb684f3d
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Assert a precondition
See:
https://lists.nongnu.org/archive/html/lmi/2023-02/msg00018.html
---
bourn_cast_test.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bourn_cast_test.cpp b/bourn_cast_test.cpp
index 3de00bb1..f2bfaf06 100644
--- a/bourn_cast_test.cpp
+++ b/bourn_cast_test.cpp
@@ -54,6 +54,7 @@ inline To bourn_cast(From from)
#include "test_tools.hpp"
#include "timer.hpp"
+#include <cfloat> // LDBL_MANT_DIG
#include <climits> // INT_MIN, LLONG_MIN, SCHAR_MIN
#include <cmath> // isnormal(), nextafterf()
@@ -82,7 +83,7 @@ void test_same(char const* file, int line)
// an 80-bit long double type whose 64-bit mantissa suffices to
// test the limits of every integral type up to 64 digits exactly
// because it can distinguish +/-(2^64) from +/-(2^64 - 1).
- if(traits::is_integer)
+ if(traits::is_integer && 64 <= LDBL_MANT_DIG)
{
long double const x = std::scalbln(1.0l, traits::digits);
long double const max = x - 1;
- [lmi-commits] [lmi] master updated (89b7e1eb -> 3f177433), Greg Chicares, 2023/02/21
- [lmi-commits] [lmi] master 613f9fcf 3/6: Make ccache ignore date and time macros, Greg Chicares, 2023/02/21
- [lmi-commits] [lmi] master f68f6e4d 4/6: Filter out ccache commands, Greg Chicares, 2023/02/21
- [lmi-commits] [lmi] master 3f177433 6/6: Assert a precondition,
Greg Chicares <=
- [lmi-commits] [lmi] master a1b50b22 5/6: Use ccache for lmi code, Greg Chicares, 2023/02/21
- [lmi-commits] [lmi] master 7c0e38bd 1/6: Establish a shared ccache directory, Greg Chicares, 2023/02/21
- [lmi-commits] [lmi] master a59de2bf 2/6: Forestall a ccache issue, Greg Chicares, 2023/02/21