c++ patch

Hans Aberg haberg at math.su.se
Sat Nov 11 21:48:11 CET 2006


On 10 Nov 2006, at 16:50, Torbjorn Granlund wrote:

> I wonder if we need to support every C++ compiler with gmp.h.  If C++
> doesn't provide the size_t type, I think we will re-introduce
> incompatibilities with those compilers, whenever we hack gmp.h.
>
> Perhaps we should instead declare exactly what gmpxx.h needs from
> gmp.h, in gmpxx.h, in a syntax every C++ compiler might understand?
> The only thing we need, are prototypes for the C functions used from
> gmpxx.h, right?

The rule for GNU projects is to, in the first hand, make sure that it  
is compatible with GCC; the rest is optional. In particular, it is  
important that one in C++ can use std::size_t without ::size_t, in  
order to avoid namespace clashes.

And I think that GNU favors giving C++ headers the filename extension  
".hh".

   Hans Aberg




More information about the gmp-bugs mailing list