Request for C++ interface doc improvement

Jerome L Quinn jlquinn at
Wed Jul 30 19:44:56 UTC 2014

Hi all,

I recently discovered the hard way that the mpz_class string constructor is
explicit.  Thus the following is a compile error:

string s = "0";
mpz_class a = s;

The docs didn't make this clear.  I'd like to suggest adding to the docs
something like the following:

Conversions from `string' or `char*' do not happen automatically.
Construction must be explicit.  For example,

    mpz_class a("245");

Jerry Quinn
jlquinn at

More information about the gmp-bugs mailing list