From 494045809e1ce639c8aa8d77b78e59564a4eeda3 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 30 Mar 2015 17:43:08 +0300 Subject: [PATCH 1/2] [util][promote integral] guard use of int128 and uint128 by the macro BOOST_GEOMETRY_ENABLE_INT128 --- include/boost/geometry/util/promote_integral.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/boost/geometry/util/promote_integral.hpp b/include/boost/geometry/util/promote_integral.hpp index 3bf4d9f89..6b23403be 100644 --- a/include/boost/geometry/util/promote_integral.hpp +++ b/include/boost/geometry/util/promote_integral.hpp @@ -165,7 +165,8 @@ struct promote_to_larger considered only if the macro BOOST_HAS_LONG_LONG is defined \note boost::int128_type and boost::uint128_type are considered - only if the macro BOOST_HAS_INT128 is defined + only if the macros BOOST_HAS_INT128 and BOOST_GEOMETRY_ENABLE_INT128 + are defined */ template < @@ -248,7 +249,7 @@ private: #if defined(BOOST_HAS_LONG_LONG) , boost::long_long_type #endif -#if defined(BOOST_HAS_INT128) +#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128) , boost::int128_type #endif #if !defined(BOOST_GEOMETRY_NO_MULTIPRECISION_INTEGER) @@ -268,7 +269,7 @@ private: #if defined(BOOST_HAS_LONG_LONG) , boost::ulong_long_type #endif -#if defined(BOOST_HAS_INT128) +#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128) , boost::uint128_type #endif #if !defined(BOOST_GEOMETRY_NO_MULTIPRECISION_INTEGER) From ba9117b37ee7194dba547bade9c0f1f24c9dea98 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 30 Mar 2015 17:44:05 +0300 Subject: [PATCH 2/2] [test][util][promote integral] guard use of int128 and uint128 by the macro --- test/util/promote_integral.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/util/promote_integral.cpp b/test/util/promote_integral.cpp index bcc80c90c..92d1b8ce4 100644 --- a/test/util/promote_integral.cpp +++ b/test/util/promote_integral.cpp @@ -35,7 +35,8 @@ #include #endif -#if defined(BOOST_GEOMETRY_TEST_DEBUG) && defined(BOOST_HAS_INT128) +#if defined(BOOST_GEOMETRY_TEST_DEBUG) +#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128) void print_uint128_t(std::ostream& os, boost::uint128_type i) { if (i == 0) @@ -74,8 +75,8 @@ std::ostream& operator<<(std::ostream& os, boost::uint128_type i) print_uint128_t(os, i); return os; } -#endif - +#endif // BOOST_HAS_INT128 && BOOST_GEOMETRY_ENABLE_INT128 +#endif // BOOST_GEOMETRY_TEST_DEBUG namespace bg = boost::geometry; @@ -296,7 +297,7 @@ struct test_promotion tester::template apply(case_id); } #endif -#if defined(BOOST_HAS_INT128) +#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128) else if (bit_size() >= min_size) { tester::template apply(case_id); @@ -366,7 +367,7 @@ struct test_promotion tester::template apply(case_id); } #endif -#if defined(BOOST_HAS_INT128) +#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128) else if (bit_size() >= min_size) { tester::template apply(case_id); @@ -448,7 +449,7 @@ BOOST_AUTO_TEST_CASE( test_long_long ) } #endif -#if defined(BOOST_HAS_INT128) +#if defined(BOOST_HAS_INT128) && defined(BOOST_GEOMETRY_ENABLE_INT128) BOOST_AUTO_TEST_CASE( test_int128 ) { test_promotion::apply("int128_t");