Boost logo

Boost :

Subject: Re: [boost] Adding detection of [u]intptr_t to Boost.Config (moving it from cstdint.hpp)
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2014-05-30 13:57:13

On Fri, May 30, 2014 at 10:53 AM, John Maddock <boost.regex_at_[hidden]> wrote:
>> Andrey, John: My motivation was that it fits in the category of
>> compiler/standard library feature detection useful for Boost library
>> authors who only want that particular feature of Boost.Integer and
>> prefer not to pull in boost::<integer types> just for that detection.
> OK. Note, however that the location of those types may vary by
> compiler/platform - the only way to be sure you've pulled in the correct
> header is to include <boost/cstdint.hpp>. On the other hand, if you're
> relying on <stdint.h> then BOOST_HAS_STDINT_H looks to do what you want
> anyway?

Except even a conforming stdint.h (or cstdint) is not required to
provide uintptr_t/intptr_t (or std::uintptr_t/std::intptr_t). The
standard should ideally have specified macros to allow C++ developers
to detect whether the implementation has chosen to provide those
types, in my opinion. However, since it does not, nothing inhibits
Boost (especially Boost.Config) from solving that problem for
developers (and not just fellow Boost library developers).


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