Boost logo

Boost Users :

Subject: Re: [Boost-users] [integer]/cstdint.hpp How to use portableliterals?
From: Kim Barrett (kab.conundrums_at_[hidden])
Date: 2009-12-10 14:12:21

On Dec 10, 2009, at 11:18 AM, John Maddock wrote:

>> Compiler flag ;) gcc -D and in Project setting of VC ;)
> Sure, but that doesn't work in a library header file where you have no control over project settings...
> I'm thinking that maybe we should change boost/cstdint.hpp to follow C++0x and always define these macros, any objections or problems if we do that?

This isn't a general solution. Consider

#include <something which includes stdint.h>
#include <boost/cstdint.hpp>

Documenting a required compiler flag is really the better solution, in my opinion.

That, and perhaps some utility macros to help library developers detect and report misconfiguration in a way that might direct users toward a solution.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at