Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-11-29 07:49:09

>1. cstdint.hpp defines the macro BOOST__STDC_CONSTANT_MACROS_DEFINED,
>has a double underscore.<

That's the macro defined by the C standard, I'm assuming that C++ will
adopt it eventually, possibly we should use a boost specific macro, in any
case the whole thing does need documenting, as you rightly point out.

>2. The way the INTXX_C macros are defined was quite astonishing to me and
>took quite some time for me to figure out (although the system seems
>cool once I got it).

Good, it means that you can use the macros, in a header and then turn them
off again to avoid polluting the includer (is that a word??) of the header.

>3. Why are the guards a la "#if UCHAR_MAX == 0xff" around the
>constant macros necessary? Even if UCHAR_MAX doesn't work out to 8 bits,
>how can you go wrong casting to uint8_t? Whatever type uint8_t works out
>will be the right type.

Good point.

- John.

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