gmp's c++ interface / mpz_class
Joel Brobecker
brobecker@adacore.com
Mon Oct 24 13:34:54 GMT 2022
> Pedro> In gdb/gmp-utils.h. However, we need do to arithmetic on the type, and this wrapper
> Pedro> type doesn't implement operator+, operator-, etc, etc. I guess we could add those,
> Pedro> as wrappers around mpz_add, etc. Or use raw mpz_add, etc. directly. However, I just found
> Pedro> out that GMP already has its own C++ interface:
>
> Pedro> https://gmplib.org/manual/C_002b_002b-Interface-General
>
> Pedro> Before we explore this further, is there an already known reason we shouldn't be using
> Pedro> that interface?
>
> I feel sure Joel and I have talked about it, but I don't remember what
> reason there was any more.
Yes, we talked about it for sure, and decided against it, but I don't
remember the reasons, unfortunately :-(.
> The warning in the manual is a bit
> off-putting, though:
>
> *Everything described in this chapter is to be considered preliminary
> and might be subject to incompatible changes if some unforeseen
> difficulty reveals itself.*
I do remember this comment played a part.
--
Joel
More information about the Gdb
mailing list