[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.5 Other Changes
For users of a C++ compiler, the way how the availability of intmax_t
is detected has changed in MPFR 3.0.
In MPFR 2.x, if a macro INTMAX_C
or UINTMAX_C
was defined
(e.g. when the __STDC_CONSTANT_MACROS
macro had been defined
before <stdint.h>
or <inttypes.h>
has been included),
intmax_t
was assumed to be defined.
However this was not always the case (more precisely, intmax_t
can be defined only in the namespace std
, as with Boost), so
that compilations could fail.
Thus the check for INTMAX_C
or UINTMAX_C
is now disabled for
C++ compilers, with the following consequences:
- Programs written for MPFR 2.x that need
intmax_t
may no longer be compiled against MPFR 3.0: a#define MPFR_USE_INTMAX_T
may be necessary before ‘mpfr.h’ is included. - The compilation of programs that work with MPFR 3.0 may fail with
MPFR 2.x due to the problem described above. Workarounds are possible,
such as defining
intmax_t
anduintmax_t
in the global namespace, though this is not clean.