make failure trying to build gmp-5.1.0a on Tru64unix v5.1b system
Marc Glisse
marc.glisse at inria.fr
Fri Feb 15 23:17:56 CET 2013
On Fri, 15 Feb 2013, Bill.Glessner at cwu.EDU wrote:
> Later in the build I encountered the following C++ issues:
>
> libtool: compile: cxx -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMPXX -I.. -D__US
> E_STD_IOSTREAM -nocompress -c limits.cc -DPIC -o .libs/limits.o
> cxx: Error: ../gmpxx.h, line 1516: no instance of function template
> "std::swap" matches the argument list
> argument types are: (__mpz_struct, __mpz_struct)
> void swap(__gmp_expr& z) __GMPXX_NOEXCEPT { std::swap(*mp, *z.mp); }
> ----------------------------------------------^
> cxx: Error: ../gmpxx.h, line 1710: no instance of function template
> "std::swap" matches the argument list
> argument types are: (__mpq_struct, __mpq_struct)
> void swap(__gmp_expr& q) __GMPXX_NOEXCEPT { std::swap(*mp, *q.mp); }
> ----------------------------------------------^
> cxx: Error: ../gmpxx.h, line 1931: no instance of function template
> "std::swap" matches the argument list
> argument types are: (__mpf_struct, __mpf_struct)
> void swap(__gmp_expr& f) __GMPXX_NOEXCEPT { std::swap(*mp, *f.mp); }
> ----------------------------------------------^
> cxx: Info: 3 errors detected in the compilation of "limits.cc".
Interesting, old versions of Sun's compiler seem to have trouble with
the same construction. Does it work if you replace:
std::swap(*mp, *z.mp);
with:
std::iter_swap(mp, z.mp);
? If not, does it work with:
mpz_swap(mp, z.mp);
? (replacing 'z' with 'q' or 'f' as appropriate for the other versions)
--
Marc Glisse
More information about the gmp-bugs
mailing list