Boost logo

Boost :

Subject: Re: [boost] Macro redefinition in boost/cstdint.hpp (1.42 beta1)
From: Beman Dawes (bdawes_at_[hidden])
Date: 2010-02-02 07:04:55

On Tue, Feb 2, 2010 at 4:04 AM, Vemund Handeland <hvemha_at_[hidden]> wrote:
> I've tested my code with the 1.42 beta, and get a lot of macro redefinition
> warnings on my system (msvc-9.0)
> The problem is redefinition of INT64_C and UINT64_C in boost/cstdint.hpp. My
> code also includes the ICU library, and these two macros are already defined
> in the ICU headers. The problem then comes down to header include order...
> I see that the updated boost/cstdint.hpp only test !defined(INT8_C) before
> defining all INT#_C and UNIT#_C macros
> The solution to my problem is to test for existence on every macro before
> definition:
> #ifndef INT#_C
> #define INT#_C( value ) ...
> #endif
> Is this appropriate fix

Yes, unless someone else can come up with a better idea. One
alternative might be to test for the particular ICU header involved,
and skip the whole block of code when found, but your fix is more

>, and should I add a ticket for this?

Yes. A patch would be much appreciated.


Boost list run by bdawes at, gregod at, cpdaniel at, john at