Suppress some msvc warnings.

This commit is contained in:
jzmaddock
2015-09-20 12:00:09 +01:00
parent d78767ef95
commit 100afbcce8
2 changed files with 12 additions and 4 deletions

View File

@@ -8,6 +8,11 @@
#ifndef BOOST_MP_CPP_INT_BIT_HPP
#define BOOST_MP_CPP_INT_BIT_HPP
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4319)
#endif
namespace boost{ namespace multiprecision{ namespace backends{
template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
@@ -653,4 +658,8 @@ inline typename enable_if_c<
}}} // namespaces
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif

View File

@@ -567,7 +567,7 @@ void test_integer_ops(const boost::mpl::int_<boost::multiprecision::number_kind_
BOOST_CHECK_EQUAL(c , a / b);
BOOST_CHECK_EQUAL(r , a % b);
BOOST_CHECK_EQUAL(integer_modulus(a, 57) , a % 57);
for(unsigned i = 0; i < 20; ++i)
for(i = 0; i < 20; ++i)
{
if(std::numeric_limits<Real>::is_specialized && (!std::numeric_limits<Real>::is_bounded || ((int)i * 17 < std::numeric_limits<Real>::digits)))
{
@@ -872,9 +872,8 @@ void test_float_ops(const boost::mpl::int_<boost::multiprecision::number_kind_fl
{
BOOST_CHECK_EQUAL(scalbn(Real(2), 5), 2 * pow(double(std::numeric_limits<Real>::radix), 5));
BOOST_CHECK_EQUAL(scalbn(Real(2), -5), Real(2) / pow(double(std::numeric_limits<Real>::radix), 5));
Real v(512);
int exponent;
Real r;
v = 512;
exponent;
exponent = ilogb(v);
r = scalbn(v, -exponent);
BOOST_CHECK(r >= 1);