Is there any interest in moving all the C++ bindings into their own namespace, say gnu::mp?

This is popular with many C++ dev libraries, like boost, for example.
There are several advantages with doing that; mainly reducing the risk of clashing with application's own symbols, or even with symbols from other libraries that an app also links to.

I can prepare a patch to do that, if there's interest.

Compatibility with existing code is trivial. Either provide a separate file that existing code can include, that contains a grand total of three typedefs:

typedef gnu::mp::mpz_class mpz_class;
typedef gnu::mp::mpf_class mpf_class;
typedef gnu::mp::mpq_class mpq_class;

Or, for 100% source backwards compatibility, rename gmpxx.h to something else, and have it declare everything in gnu::mp, and replace gmpxx.h with a stub that includes the real file, and provides the three typedefs.

Attachment: pgpjLFou4kEol.pgp
Description: PGP signature

_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
http://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to