summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--gmpxx.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c26658939..2e0602f33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-06-02 Marc Glisse <marc.glisse@inria.fr>
+
+ * gmpxx.h (mpf_class::operator bool): Use mpf_sgn to access _mp_size.
+
2017-05-31 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/core2/logops_n.asm: New file.
diff --git a/gmpxx.h b/gmpxx.h
index 389c0d424..42d331658 100644
--- a/gmpxx.h
+++ b/gmpxx.h
@@ -2113,7 +2113,7 @@ public:
// bool fits_ldouble_p() const { return mpf_fits_ldouble_p(mp); }
#if __GMPXX_USE_CXX11
- explicit operator bool() const { return mp->_mp_size != 0; }
+ explicit operator bool() const { return mpf_sgn(mp) != 0; }
#endif
// compound assignments