Moving C++ bindings in gmpxx.h into a namespace

Sam Varshavchik mrsam at
Sun Jun 30 14:34:26 CEST 2013

Niels Möller writes:

> Sam Varshavchik <mrsam at> writes:
> > Compatibility with existing code is trivial.
> What about binary compatibility? I imagine namespaces are involved in
> the symbol name mangling in some way?
> (I'm no C++ guy, so I don't have any strong opinion on whether or not
> it's a good idea to use namespaces in GMP).

Correct, and binary compatibility is lesser of an issue for C++ than it is  
for C. It's generally expected that C++ source is going to get recompiled  
after updating a library. See, for example:

Another data point: although recently gcc is trying to maintain its own  
libstdc++'s ABI compatibility across major branch releases, for a while the  
ABI was compatible only within a gcc branch release. Until some time ago,  
even if some particular C++ library's ABI remained the same, app code (and  
that library itself!) would need to be recompiled after updating gcc.

Additionally, does not use versioning. This would also be a  
consideration to discuss, here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <>

More information about the gmp-devel mailing list