Boost logo

Boost Users :

From: Cory Nelson (phrosty_at_[hidden])
Date: 2005-07-22 02:04:40


On 7/21/05, Jeff Garland <jeff_at_[hidden]> wrote:
> On Thu, 21 Jul 2005 18:38:16 -0600, Sean Rohead wrote
> > I am using VS.NET 2003 and have a simple program which merely
> > includes the Boost date_time library. When compiling, I get 4
> > warning messages about unsafe conversions.
>
> Sigh...
>
> > Is there some compiler
> > setting that I can change to get rid of this warning?
>
> Yes, but you shouldn't have to...
>
> > Shouldn't I
> > be able to include a Boost library without getting warnings?
>
> Yes. We have a basic issue with the testing platform right now that does not
> allow us to see compiler warnings unless the compilation fails. Compilers
> vary widely in the warnings they produce so even though date-time compiles
> fine with -Wall using gcc (my primary compiler) these kind of problems can
> crop up. Anyway, I'll look into these, but it will probably have to wait for 1.34.

Is a cast really something that needs to be held back until the next
release? If so, I don't think anyone would object to temporarily
wrapping the header in #pragmas for VC++. It certainly is annoying to
have to do this stuff every time I want to include the header.

#pragma warning(push)
#pragma warning(disable:4244)

// stuff here

#pragma warning(pop)

> Jef
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
Cory Nelson
http://www.int64.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net