| Index: third_party/numerics/safe_math_impl.h
|
| diff --git a/third_party/numerics/safe_math_impl.h b/third_party/numerics/safe_math_impl.h
|
| index 4bf59e64e07c6ce6edde7deee2e2014bc623749c..de5e2c9b24e26867670c3a1a1091b0fa7220c4b5 100644
|
| --- a/third_party/numerics/safe_math_impl.h
|
| +++ b/third_party/numerics/safe_math_impl.h
|
| @@ -173,9 +173,10 @@ CheckedMul(T x, T y, RangeConstraint* validity) {
|
| }
|
|
|
| template <typename T>
|
| -typename enable_if<std::numeric_limits<T>::is_integer&& std::numeric_limits<
|
| - T>::is_signed&&(sizeof(T) * 2 > sizeof(uintmax_t)),
|
| - T>::type
|
| +typename enable_if<
|
| + std::numeric_limits<T>::is_integer &&
|
| + std::numeric_limits<T>::is_signed&&(sizeof(T) * 2 > sizeof(uintmax_t)),
|
| + T>::type
|
| CheckedMul(T x, T y, RangeConstraint* validity) {
|
| // if either side is zero then the result will be zero.
|
| if (!(x || y)) {
|
| @@ -232,7 +233,7 @@ T CheckedDiv(
|
|
|
| template <typename T>
|
| typename enable_if<
|
| - std::numeric_limits<T>::is_integer&& std::numeric_limits<T>::is_signed,
|
| + std::numeric_limits<T>::is_integer && std::numeric_limits<T>::is_signed,
|
| T>::type
|
| CheckedMod(T x, T y, RangeConstraint* validity) {
|
| *validity = y > 0 ? RANGE_VALID : RANGE_INVALID;
|
| @@ -250,7 +251,7 @@ CheckedMod(T x, T y, RangeConstraint* validity) {
|
|
|
| template <typename T>
|
| typename enable_if<
|
| - std::numeric_limits<T>::is_integer&& std::numeric_limits<T>::is_signed,
|
| + std::numeric_limits<T>::is_integer && std::numeric_limits<T>::is_signed,
|
| T>::type
|
| CheckedNeg(T value, RangeConstraint* validity) {
|
| *validity =
|
| @@ -272,7 +273,7 @@ CheckedNeg(T value, RangeConstraint* validity) {
|
|
|
| template <typename T>
|
| typename enable_if<
|
| - std::numeric_limits<T>::is_integer&& std::numeric_limits<T>::is_signed,
|
| + std::numeric_limits<T>::is_integer && std::numeric_limits<T>::is_signed,
|
| T>::type
|
| CheckedAbs(T value, RangeConstraint* validity) {
|
| *validity =
|
| @@ -295,7 +296,7 @@ CheckedAbs(T value, RangeConstraint* validity) {
|
| #define BASE_FLOAT_ARITHMETIC_STUBS(NAME) \
|
| template <typename T> \
|
| typename enable_if<std::numeric_limits<T>::is_iec559, T>::type \
|
| - Checked##NAME(T, T, RangeConstraint*) { \
|
| + Checked##NAME(T, T, RangeConstraint*) { \
|
| NOTREACHED(); \
|
| return 0; \
|
| }
|
| @@ -340,8 +341,8 @@ struct GetNumericRepresentation {
|
| : NUMERIC_UNKNOWN);
|
| };
|
|
|
| -template <typename T, NumericRepresentation type =
|
| - GetNumericRepresentation<T>::value>
|
| +template <typename T,
|
| + NumericRepresentation type = GetNumericRepresentation<T>::value>
|
| class CheckedNumericState {};
|
|
|
| // Integrals require quite a bit of additional housekeeping to manage state.
|
| @@ -463,8 +464,7 @@ template <typename Lhs,
|
| : DEFAULT_PROMOTION)
|
| : (MaxExponent<Rhs>::value > MaxExponent<int>::value
|
| ? RIGHT_PROMOTION
|
| - : DEFAULT_PROMOTION) >
|
| -struct ArithmeticPromotion;
|
| + : DEFAULT_PROMOTION) > struct ArithmeticPromotion;
|
|
|
| template <typename Lhs, typename Rhs>
|
| struct ArithmeticPromotion<Lhs, Rhs, LEFT_PROMOTION> {
|
|
|