From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-04-12 07:31:50
Yariv Tal writes:
> 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
> (warning goes on and on...)
> Is this a known issue?
> When would this lead to errornous program behaviour? (maybe never?)
I'm sure you've figured it out, but basically what the compiler
is saying here is that 'long<LONG_MAX>::next::value'
will yield something different from LONG_MAX + 1. As long as you
are not using this value, you're fine.
> Are there plans to fix it?
Yes. Expect it to be fixed for 1.33.
Thanks for the report,
-- Aleksey Gurtovoy MetaCommunications Engineering
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk