gmpxx implicit conversion between types

Torbjorn Granlund tg at
Tue Mar 8 17:29:17 CET 2011

Marc Glisse <marc.glisse at> writes:

  On Mon, 7 Mar 2011, Emmanuel Thomé wrote:
  > I would consider this a sensible change, despite the fact that it would
  > break code relying on the implicit conversion.
  Attached is a patch that prevents implicit conversions from mpq and
  mpf to mpz. It might be a good idea to also disable conversions to
  mpf, but I don't know, I need other opinions. Conversions to mpq sound
  fine to me (no loss of information, although an mpf may generate a
  huge mpq).

I am not enough of a C++ type to know which conversions to make
implicitly, and how relevant this is for backwards compatibility.

Am I right to assume that this only affects source compatibility, or
does it somehow also affects binary compatibility?  In the latter case,
we need to update the libtool solib numbers in the toplevel


More information about the gmp-discuss mailing list