From bc2349f71b5907673bb3b67fca2039e1725781c6 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 20 Aug 2017 01:57:09 +0300 Subject: [PATCH 1/3] Corrected make_odd return type inconsistency. Make gcd_traits::make_odd return unsigned int, similar to all other gcd_traits specializations. Also, correct the local variable types that receive the result of make_odd to avoid warnings about unintended conversion. --- include/boost/integer/common_factor_rt.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/integer/common_factor_rt.hpp b/include/boost/integer/common_factor_rt.hpp index 341b316..d79a9c5 100644 --- a/include/boost/integer/common_factor_rt.hpp +++ b/include/boost/integer/common_factor_rt.hpp @@ -223,7 +223,7 @@ namespace boost { template <> struct gcd_traits : public gcd_traits_defaults { BOOST_FORCEINLINE static unsigned make_odd(unsigned char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits::find_lsb(val); val >>= result; return result; } }; template <> struct gcd_traits : public gcd_traits_defaults - { BOOST_FORCEINLINE static signed make_odd(signed char& val)BOOST_NOEXCEPT{ signed result = gcd_traits::find_lsb(val); val >>= result; return result; } }; + { BOOST_FORCEINLINE static unsigned make_odd(signed char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits::find_lsb(val); val >>= result; return result; } }; template <> struct gcd_traits : public gcd_traits_defaults { BOOST_FORCEINLINE static unsigned make_odd(char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits::find_lsb(val); val >>= result; return result; } }; #ifndef BOOST_NO_INTRINSIC_WCHAR_T @@ -310,7 +310,7 @@ namespace boost { }; template <> struct gcd_traits : public gcd_traits_defaults { - BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR signed make_odd(signed char& val)BOOST_NOEXCEPT { signed result = gcd_traits::find_lsb(val); val >>= result; return result; } + BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(signed char& val)BOOST_NOEXCEPT { unsigned result = gcd_traits::find_lsb(val); val >>= result; return result; } }; template <> struct gcd_traits : public gcd_traits_defaults { @@ -373,8 +373,8 @@ namespace boost { if (n == SteinDomain(0)) return m; // m > 0 && n > 0 - int d_m = gcd_traits::make_odd(m); - int d_n = gcd_traits::make_odd(n); + unsigned d_m = gcd_traits::make_odd(m); + unsigned d_n = gcd_traits::make_odd(n); // odd(m) && odd(n) while (m != n) { From 661986dd3dee1d8f08e81cab2913214782490cc8 Mon Sep 17 00:00:00 2001 From: Nick Thompson Date: Sun, 11 Feb 2018 12:32:14 -0600 Subject: [PATCH 2/3] [ci skip] Deprecate boost/pending/integer_log2.hpp --- include/boost/pending/integer_log2.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/pending/integer_log2.hpp b/include/boost/pending/integer_log2.hpp index 023ec7a..9384594 100644 --- a/include/boost/pending/integer_log2.hpp +++ b/include/boost/pending/integer_log2.hpp @@ -1,9 +1,9 @@ #ifndef BOOST_PENDING_INTEGER_LOG2_HPP #define BOOST_PENDING_INTEGER_LOG2_HPP -// The header file at this path is deprecated; -// use boost/integer/integer_log2.hpp instead. - #include +#include + +BOOST_HEADER_DEPRECATED(""); #endif From 6a97e49614109f523a1bd0f802e5b6b4b5948b7a Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Wed, 24 Oct 2018 17:56:15 +0300 Subject: [PATCH 3/3] Added a readme. Added myself as a maintainer. --- README.md | 25 +++++++++++++++++++++++++ meta/libraries.json | 1 + 2 files changed, 26 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..eec57c0 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Boost.Integer + +Boost.Integer, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), provides +integer type support, particularly helpful in generic programming. It provides the means to select +an integer type based upon its properties, like the number of bits or the maximum supported value, +as well as compile-time bit mask selection. There is a derivative of `std::numeric_limits` that provides +integral constant expressions for `min` and `max`... +Finally, it provides two compile-time algorithms: determining the highest power of two in a. +compile-time value; and computing min and max of constant expressions. + +### Directories + +* **doc** - QuickBook documentation sources +* **include** - Interface headers of Boost.Integer +* **test** - Boost.Atomic unit tests + +### More information + +* [Documentation](http://boost.org/libs/integer) +* [Report bugs](https://github.com/boostorg/integer/issues/new). Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well. +* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). + +### License + +Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). diff --git a/meta/libraries.json b/meta/libraries.json index 6345c37..da2d694 100644 --- a/meta/libraries.json +++ b/meta/libraries.json @@ -8,5 +8,6 @@ "authors": "", "maintainers": [ "Daryle Walker " + "Andrey Semashev " ] }