[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GMP C/C++ namespace conflict

From: Kevin Ryde
Subject: Re: GMP C/C++ namespace conflict
Date: 30 Apr 2001 09:46:04 +1000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5

Hans Aberg <address@hidden> writes:
> Now, if one is using dedicated namespace programming, one does not want to
> have this "using namespace std", and once it has appeared in the input,
> there is no way to nullify its effect on names.

You mean all the gmp functions end up in "std"?

> If one should follow this C++ standard library, then gmp.h could add "using
> namespace std" (which happens because of the inclusion of the <stddef.h>
> instead of the <cstdlib> header), but the header <gmp> that might be added
> for use with C++ only should not add "using namespace std".

I guess that would work.  Is that the usual approach?  I might have
thought there'd be a lot of old headers supporting c++ only with
extern "C", so perhaps there's a standard approach to the problem.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]