Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2005-11-01 23:49:40

On Tue, 1 Nov 2005 10:04:46 -0800, Robert Ramey wrote
> FWIW - for the serialization library and tests I tweaked the
> relevent Jamfiles to include a command line switch to suppress these
> warnings. I"m sure it would be easy for someone to include this in
> the toolset *.jam files.

Of course this doesn't help if the user project includes a headers that does
something inline with one of these calls. So for date-time I've wrapped up the
'deprecated calls in the following magic:

#if (defined(_MSC_VER) && (_MSC_VER >= 1400))
#pragma warning(push) // preserve warning settings
#pragma warning(disable : 4996) // disable deprecated localtime/gmtime warning
on vc8
#endif // _MSC_VER >= 1400
  //make the deprecated calls...

#if (defined(_MSC_VER) && (_MSC_VER >= 1400))
#pragma warning(pop) // restore warnings to previous state
#endif // _MSC_VER >= 1400

In date-time this is easy b/c all these calls are in about 20 lines of code.
This solution silences both library and user build -- allowing the user to
decide on whether they want the warnings for their own code.

BTW, b/c builds on the HEAD with VC8 are really few and far between these
days, this change hasn't appeared in the regression results yet...

> Of course one would have to add an explanation in some rationale
> some where why boost does it this way - but I wouldn't think that
> would be a big problem

I suppose no matter the solution some documentation is in order. What do you
think the odds are we can get Microsoft to write it ;-)


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