diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gmpxx.h | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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. @@ -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 |