From 8ffa5b914983c0b0f4cf5a73b3df9b1b9cb40788 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 2 Jun 2017 12:18:50 +0200 Subject: Use mpf_sgn to access _mp_size in gmpxx.h. This helps mpf2mpfr.h without changing the generated code (at least with gcc). --- gmpxx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gmpxx.h') 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 -- cgit v1.2.1