Lines Matching refs:CheckedNumeric
96 class CheckedNumeric {
103 constexpr CheckedNumeric() = default;
107 constexpr CheckedNumeric(const CheckedNumeric<Src>& rhs) in CheckedNumeric() function
111 friend class CheckedNumeric; variable
116 constexpr CheckedNumeric(Src value) // NOLINT(runtime/explicit) in CheckedNumeric() function
124 constexpr CheckedNumeric( in CheckedNumeric() function
176 constexpr CheckedNumeric<typename UnderlyingType<Dst>::type> Cast() const { in Cast()
184 friend U GetNumericValueForTest(const CheckedNumeric<U>& src);
188 CheckedNumeric& operator+=(const Src rhs);
190 CheckedNumeric& operator-=(const Src rhs);
192 CheckedNumeric& operator*=(const Src rhs);
194 CheckedNumeric& operator/=(const Src rhs);
196 CheckedNumeric& operator%=(const Src rhs);
198 CheckedNumeric& operator<<=(const Src rhs);
200 CheckedNumeric& operator>>=(const Src rhs);
202 CheckedNumeric& operator&=(const Src rhs);
204 CheckedNumeric& operator|=(const Src rhs);
206 CheckedNumeric& operator^=(const Src rhs);
208 constexpr CheckedNumeric operator-() const {
209 return CheckedNumeric<T>(
217 constexpr CheckedNumeric operator~() const {
218 return CheckedNumeric<decltype(InvertWrapper(T()))>(
222 constexpr CheckedNumeric Abs() const { in Abs()
223 return CheckedNumeric<T>( in Abs()
231 constexpr CheckedNumeric<typename MathWrapper<CheckedMaxOp, T, U>::type> Max( in Max()
237 return CheckedNumeric<result_type>( in Max()
246 constexpr CheckedNumeric<typename MathWrapper<CheckedMinOp, T, U>::type> Min( in Min()
252 return CheckedNumeric<result_type>( in Min()
263 constexpr CheckedNumeric<typename UnsignedOrFloatForSize<T>::type>
265 return CheckedNumeric<typename UnsignedOrFloatForSize<T>::type>( in UnsignedAbs()
269 CheckedNumeric& operator++() {
274 CheckedNumeric operator++(int) {
275 CheckedNumeric value = *this;
280 CheckedNumeric& operator--() {
285 CheckedNumeric operator--(int) {
286 CheckedNumeric value = *this;
296 static CheckedNumeric MathOp(const L lhs, const R rhs) { in MathOp()
302 return CheckedNumeric<T>(result, is_valid); in MathOp()
307 CheckedNumeric& MathOp(const R rhs) { in MathOp()
312 *this = CheckedNumeric<T>(result, is_valid); in MathOp()
320 constexpr CheckedNumeric(Src value, bool is_valid) in CheckedNumeric() function
332 struct Wrapper<CheckedNumeric<Src>> {
333 static constexpr bool is_valid(const CheckedNumeric<Src> v) {
336 static constexpr Src value(const CheckedNumeric<Src> v) {
352 constexpr bool IsValidForType(const CheckedNumeric<Src> value) {
358 const CheckedNumeric<Src> value) {
364 const CheckedNumeric<Src> value,
396 constexpr CheckedNumeric<typename UnderlyingType<T>::type> MakeCheckedNum(
405 CheckedNumeric<typename MathWrapper<M, L, R>::type> ChkMathOp(const L lhs,
408 return CheckedNumeric<typename Math::result_type>::template MathOp<M>(lhs,
417 CheckedNumeric<typename ResultType<M, L, R, Args...>::type>
429 CheckedNumeric<typename ResultType<Checked##NAME##Op, L, R, Args...>::type> \
439 CheckedNumeric<typename MathWrapper<Checked##NAME##Op, L, R>::type> \
446 CheckedNumeric<L>& CheckedNumeric<L>::operator COMPOUND_OP(const R rhs) { \
489 using internal::CheckedNumeric;