Boost logo

Boost Users :

From: Yariv Tal (yariv_tal2003_at_[hidden])
Date: 2005-03-28 09:07:03


On Visual Studio.NET / VC7.1 the following code:

#include <boost/mpl/long.hpp>
#include <climits>
boost::mpl::long_<LONG_MAX> lll;

Gives the following warning:
...\boost_1_32_0\boost\mpl\aux_\integral_wrapper.hpp(72) : warning C4307:
'+' : integral constant overflow
...\main.cpp(39) : see reference to class template instantiation
'boost::mpl::long_<N>' being compiled
with
[
N=2147483647
]

Obviously, the compiler is right about the overflow, and, IMHO, the same
holds for using any maximal/minimal value for a specific type.

Is this a known issue?
Does it cause any actual problems? (in other words: can I ignore the
warning? always? sometimes? never?)

Thanks,
Yariv Tal.


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