Add boost-1.66.0-spirit-abs-overflow.patch file
This commit is contained in:
parent
b59c4b6666
commit
dc827b0935
1 changed files with 15 additions and 0 deletions
15
boost-1.66.0-spirit-abs-overflow.patch
Normal file
15
boost-1.66.0-spirit-abs-overflow.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- boost_1_66_0/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp~ 2018-02-23 16:59:53.785141676 +0000
|
||||
+++ boost_1_66_0/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp 2018-02-23 17:00:16.838092946 +0000
|
||||
@@ -68,7 +68,11 @@
|
||||
typedef unsignedtype type; \
|
||||
static type call(signedtype n) \
|
||||
{ \
|
||||
- return static_cast<unsignedtype>((n >= 0) ? n : -n); \
|
||||
+ if (n >= 0) \
|
||||
+ return n; \
|
||||
+ if (n == std::numeric_limits<signedtype>::min()) \
|
||||
+ return (unsignedtype)n; \
|
||||
+ return (unsignedtype)(-n); \
|
||||
} \
|
||||
} \
|
||||
/**/
|
||||
Loading…
Add table
Add a link
Reference in a new issue