[CI SKIP] Disable multiprecision in certain compilers.

This commit is contained in:
Nick Thompson
2018-10-29 08:52:20 -06:00
parent f76d776698
commit cd60c4c9f9
3 changed files with 16 additions and 5 deletions

View File

@ -32,12 +32,12 @@ boost::optional<Z> mod_inverse(Z a, Z modulus)
if (a == 0)
{
// a doesn't have a modular multiplicative inverse:
return {};
return boost::none;
}
euclidean_result_t<Z> u = extended_euclidean(a, modulus);
if (u.gcd > 1)
{
return {};
return boost::none;
}
// x might not be in the range 0 < x < m, let's fix that:
while (u.x <= 0)

View File

@ -4,8 +4,13 @@
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
// A bug in gcc 4.8, not worth fixing, causes this to fail on gcc4.8.
#if __GNUC__ > 4
#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1500)) || \
(defined(__clang_major__) && (__clang_major__ == 3) && (__clang_minor__ < 2)) || \
(defined(BOOST_GCC) && defined(BOOST_GCC_CXX11) && BOOST_GCC < 40800)
#define DISABLE_MP_TESTS
#endif
#ifndef DISABLE_MP_TESTS
#include <cassert>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/integer/common_factor.hpp>

View File

@ -4,7 +4,13 @@
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#if __GNUC__ > 4
#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1500)) || \
(defined(__clang_major__) && (__clang_major__ == 3) && (__clang_minor__ < 2)) || \
(defined(BOOST_GCC) && defined(BOOST_GCC_CXX11) && BOOST_GCC < 40800)
#define DISABLE_MP_TESTS
#endif
#ifndef DISABLE_MP_TESTS
#include <cassert>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/integer/common_factor.hpp>