bug-gmp
[Top][All Lists]
Advanced

[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: 03 May 2001 09:51:17 +1000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5

Hans Aberg <address@hidden> writes:
>
> At 12:24 +0200 2001/04/30, Hans Aberg wrote:
> >If you include the C header <stddef.h>, which then under C++ should
> >include <cstddef>, before the above write
> >
> >#ifdef __cplusplus
> >#include <cstddef>
> >#else
> >#include <stddef.h>
> >#endif

Yep, thanks, that would be fine.  But is there a c++ standards version
that can be checked in the preprocessor to see whether the <cstddef>
ought to work?

> Oops. If one is doing it, size_t will be named std::size_t. So one might add
> #ifdef __cplusplus
> #define size_t std::size_t
> #endif

Really?  Isn't it the purpose of <cstddef> to provide a plain size_t
(or do I misunderstand badly)?



reply via email to

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