From 978891dd60e07db37a22772a87b95be0f699d299 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 7 Oct 2016 23:07:34 -0500 Subject: [PATCH 1/2] Add, and update, documentation build targets. --- doc/Jamfile.v2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 9b38d99..604371d 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -53,3 +53,8 @@ boostbook standalone ; +############################################################################### +alias boostdoc ; +explicit boostdoc ; +alias boostrelease : standalone ; +explicit boostrelease ; From 28339f23cd5e748c3864ca8d6527936470b7a5ca Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 2 Jul 2017 12:56:35 +0300 Subject: [PATCH 2/2] Fix undefined behavior in interval_bounds::reverse_right() The ~ operator converts _bits from unsigned char to int, and makes it negative to boot. Shifting left a negative number is undefined behavior. Cast it back to unsigned char to prevent undefined behavior. --- include/boost/icl/interval_bounds.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/icl/interval_bounds.hpp b/include/boost/icl/interval_bounds.hpp index edf16d0..f917cb6 100644 --- a/include/boost/icl/interval_bounds.hpp +++ b/include/boost/icl/interval_bounds.hpp @@ -41,8 +41,8 @@ class interval_bounds interval_bounds all ()const { return interval_bounds(_bits & _all ); } interval_bounds left ()const { return interval_bounds(_bits & _left ); } interval_bounds right()const { return interval_bounds(_bits & _right); } - interval_bounds reverse_left ()const { return interval_bounds((~_bits>>1) & _right); } - interval_bounds reverse_right()const { return interval_bounds((~_bits<<1) & _left ); } + interval_bounds reverse_left ()const { return interval_bounds((bound_type(~_bits)>>1) & _right); } + interval_bounds reverse_right()const { return interval_bounds((bound_type(~_bits)<<1) & _left ); } bound_type bits()const{ return _bits; }