[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master dea45f1 5/8: Avoid 'static constexpr' locals
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master dea45f1 5/8: Avoid 'static constexpr' locals |
Date: |
Mon, 24 Apr 2017 16:43:51 -0400 (EDT) |
branch: master
commit dea45f14aa6727d010514346ba8c0ac3891d8464
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Avoid 'static constexpr' locals
See:
http://lists.nongnu.org/archive/html/lmi/2017-04/msg00031.html
et seqq.
---
bourn_cast.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bourn_cast.hpp b/bourn_cast.hpp
index 28375b9..2121286 100644
--- a/bourn_cast.hpp
+++ b/bourn_cast.hpp
@@ -172,7 +172,7 @@ inline To bourn_cast(From from, std::true_type,
std::false_type)
static From const limit = std::ldexp(From(1), to_traits::digits);
- static constexpr bool is_twos_complement(~To(0) == -To(1));
+ constexpr bool is_twos_complement(~To(0) == -To(1));
if(std::isnan(from))
throw std::runtime_error("Cannot cast NaN to integral.");
@@ -314,8 +314,8 @@ inline To bourn_cast(From from)
static_assert(2 == to_traits::radix, "");
static_assert(2 == from_traits::radix, "");
- static constexpr bool to_integer = to_traits::is_integer;
- static constexpr bool from_integer = from_traits::is_integer;
+ constexpr bool to_integer = to_traits::is_integer;
+ constexpr bool from_integer = from_traits::is_integer;
static_assert( to_integer || to_traits::is_iec559, "");
static_assert(from_integer || from_traits::is_iec559, "");
- [lmi-commits] [lmi] master updated (29808d8 -> 2f1cecc), Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 27584b1 1/8: Use is_signed to differentiate between signed and unsigned, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 895c823 3/8: Do not make variable initialized with ldexp() constexpr, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master b5fe551 4/8: Write 'const' after the type it modifies, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master a9c5ed5 7/8: Resolve a marked defect [389], Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 6327528 6/8: Use C++11 overloads for C99 <math.h> functions, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 461c143 2/8: Replace boost::numeric_cast with bourn_cast, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master dea45f1 5/8: Avoid 'static constexpr' locals,
Greg Chicares <=
- [lmi-commits] [lmi] master 2f1cecc 8/8: Explicitly qualify std::fabs(), Greg Chicares, 2017/04/24