Lines Matching refs:Promotion
58 using Promotion =
65 if (BASE_NUMERICS_UNLIKELY(!IsValueInRangeForNumericType<Promotion>(x) ||
66 !IsValueInRangeForNumericType<Promotion>(y))) {
70 Promotion presult = {};
72 if (IsIntegerArithmeticSafe<Promotion, T, U>::value) {
73 presult = static_cast<Promotion>(x) + static_cast<Promotion>(y);
75 is_valid = CheckedAddImpl(static_cast<Promotion>(x),
76 static_cast<Promotion>(y), &presult);
118 using Promotion =
125 if (BASE_NUMERICS_UNLIKELY(!IsValueInRangeForNumericType<Promotion>(x) ||
126 !IsValueInRangeForNumericType<Promotion>(y))) {
130 Promotion presult = {};
132 if (IsIntegerArithmeticSafe<Promotion, T, U>::value) {
133 presult = static_cast<Promotion>(x) - static_cast<Promotion>(y);
135 is_valid = CheckedSubImpl(static_cast<Promotion>(x),
136 static_cast<Promotion>(y), &presult);
178 using Promotion = typename FastIntegerArithmeticPromotion<T, U>::type;
180 if (BASE_NUMERICS_UNLIKELY((!IsValueInRangeForNumericType<Promotion>(x) ||
181 !IsValueInRangeForNumericType<Promotion>(y)) &&
186 Promotion presult = {};
188 if (CheckedMulFastOp<Promotion, Promotion>::is_supported) {
190 is_valid = CheckedMulFastOp<Promotion, Promotion>::Do(x, y, &presult);
191 } else if (IsIntegerArithmeticSafe<Promotion, T, U>::value) {
192 presult = static_cast<Promotion>(x) * static_cast<Promotion>(y);
194 is_valid = CheckedMulImpl(static_cast<Promotion>(x),
195 static_cast<Promotion>(y), &presult);
220 using Promotion = typename BigEnoughPromotion<T, U>::type;
223 IsTypeInRangeForNumericType<T, Promotion>::value &&
224 static_cast<Promotion>(x) ==
225 std::numeric_limits<Promotion>::lowest() &&
231 if (BASE_NUMERICS_UNLIKELY((!IsValueInRangeForNumericType<Promotion>(x) ||
232 !IsValueInRangeForNumericType<Promotion>(y)) &&
237 Promotion presult = Promotion(x) / Promotion(y);
254 using Promotion = typename BigEnoughPromotion<T, U>::type;
256 Promotion presult = static_cast<Promotion>(x) % static_cast<Promotion>(y);
257 *result = static_cast<Promotion>(presult);
429 using Promotion = typename MaxExponentPromotion<T, U>::type; \
430 Promotion presult = x OP y; \