summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/rational.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/rational.hpp')
-rw-r--r--3rdParty/Boost/src/boost/rational.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/rational.hpp b/3rdParty/Boost/src/boost/rational.hpp
index 468db79..fd04b6b 100644
--- a/3rdParty/Boost/src/boost/rational.hpp
+++ b/3rdParty/Boost/src/boost/rational.hpp
@@ -25,15 +25,15 @@
// types (Daryle Walker)
// 04 Nov 06 Off-load GCD and LCM to Boost.Math; add some invariant checks;
// add std::numeric_limits<> requirement to help GCD (Daryle Walker)
// 31 Oct 06 Recoded both operator< to use round-to-negative-infinity
// divisions; the rational-value version now uses continued fraction
// expansion to avoid overflows, for bug #798357 (Daryle Walker)
-// 20 Oct 06 Fix operator bool_type for CW 8.3 (Joaquín M López Muñoz)
+// 20 Oct 06 Fix operator bool_type for CW 8.3 (Joaquín M López Muñoz)
// 18 Oct 06 Use EXPLICIT_TEMPLATE_TYPE helper macros from Boost.Config
-// (Joaquín M López Muñoz)
+// (Joaquín M López Muñoz)
// 27 Dec 05 Add Boolean conversion operator (Daryle Walker)
// 28 Sep 02 Use _left versions of operators from operators.hpp
// 05 Jul 01 Recode gcd(), avoiding std::swap (Helmut Zeisel)
// 03 Mar 01 Workarounds for Intel C++ 5.0 (David Abrahams)
// 05 Feb 01 Update operator>> to tighten up input syntax
// 05 Feb 01 Final tidy up of gcd code prior to the new release
@@ -386,15 +386,17 @@ bool rational<IntType>::operator< (const rational<IntType>& r) const
// is bad for later calculations that assume a positive denominator.
BOOST_ASSERT( this->den > zero );
BOOST_ASSERT( r.den > zero );
// Determine relative order by expanding each value to its simple continued
// fraction representation using the Euclidian GCD algorithm.
- struct { int_type n, d, q, r; } ts = { this->num, this->den, this->num /
- this->den, this->num % this->den }, rs = { r.num, r.den, r.num / r.den,
- r.num % r.den };
+ struct { int_type n, d, q, r; }
+ ts = { this->num, this->den, static_cast<int_type>(this->num / this->den),
+ static_cast<int_type>(this->num % this->den) },
+ rs = { r.num, r.den, static_cast<int_type>(r.num / r.den),
+ static_cast<int_type>(r.num % r.den) };
unsigned reverse = 0u;
// Normalize negative moduli by repeatedly adding the (positive) denominator
// and decrementing the quotient. Later cycles should have all positive
// values, so this only has to be done for the first cycle. (The rules of
// C++ require a nonnegative quotient & remainder for a nonnegative dividend