I'm having problems with integer traits when passed an __int64 type data type under Visual C++. I run the following test: boost::mpl::print< boost::mpl::integral_c< boost::intmax_t, boost::integer_traitsboost::intmax_t::const_min
x13;
boost::mpl::print< boost::mpl::integral_c< boost::intmax_t, boost::integer_traitsboost::intmax_t::const_max
x8;
What I expect to get for const_min is:
...
1> T=boost::mpl::integral_cboost::intmax_t,0x8000000000000000
...
What I get is:
1>test_fixed_type.cpp
1>c:\boostrelease\boost\mpl\print.hpp(51) : warning C4308: negative integral
constant converted to unsigned type
1> c:\projects\boost projects\safe_numerics\include\test_fixed_type.cpp(13)
: see reference to class template instantiation 'boost::mpl::print<T>' being
compiled
1> with
1> [
1> T=boost::mpl::integral_cboost::intmax_t,0x800000000
1> ]
1>c:\boostrelease\boost\mpl\print.hpp(51) : warning C4308: negative integral
constant converted to unsigned type
1> c:\projects\boost projects\safe_numerics\include\test_fixed_type.cpp(20)
: see reference to class template instantiation 'boost::mpl::print<T>' being
compiled
1> with
1> [
1> T=boost::mpl::integral_cboost::intmax_t,0x7fffffffffffffff
1> ]
That is the value for const_min is not correct !!. Note I've tried various
different types such as using __int64 and also changed the rendering of he
real vale to _I64_MIN. None of this seems to fix things.
I've also tried making my own specialzation of integral_c for this type:
template