title: Is there a portable method of converting a `uintmax_t` to a `mpz_t`?
body: <p>Is there a portable method of converting a <code>uintmax_t</code> to a <code>mpz_t</code>?</p>
  
  <p>Compiling the following code with clang on OSX fails because there is no constructor for uint64_t for mpz_class.</p>
  
  <pre><code>const mpz_class maxUint64 = std::numeric_limits&lt;uint64_t&gt;::max();
  </code></pre>
  
  <blockquote>
    <p>error: conversion from 'type' (aka 'unsigned long long') to 'const mpz_class' (aka 'const __gmp_expr&lt;__mpz_struct [1], __mpz_struct [1]>') is ambiguous<br>
       static const mpz_class maxUint64 = std::numeric_limits::max();</p>
  </blockquote>