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