Bitwise logic gmpxx.h problems

Torbjorn Granlund tg at
Thu Jul 24 20:26:34 CEST 2008

Joppe Bos <jwbos at> writes:

  I am not an experienced C++ hacker but the problem of these
  compiler errors are the following lines in gmpxx.h:
  __GMPZZ_DEFINE_COMPOUND_OPERATOR(operator&=, __gmp_binary_and)
  __GMPZZ_DEFINE_COMPOUND_OPERATOR(operator|=, __gmp_binary_ior)
  __GMPZZ_DEFINE_COMPOUND_OPERATOR(operator^=, __gmp_binary_xor)
  Replacing the double PP and ZZ by single ones solves the problem.

Do you base this on experiments, or on analysis from reading the code?

There ought to be a reason for the ZZ variant, they are used just for
bitwise ops.


More information about the gmp-bugs mailing list