Lines Matching refs:CheckedNumeric
19 class CheckedNumeric {
26 constexpr CheckedNumeric() = default;
30 constexpr CheckedNumeric(const CheckedNumeric<Src>& rhs) in CheckedNumeric() function
34 friend class CheckedNumeric; variable
39 constexpr CheckedNumeric(Src value) // NOLINT(runtime/explicit) in CheckedNumeric() function
47 constexpr CheckedNumeric( in CheckedNumeric() function
108 constexpr CheckedNumeric<typename UnderlyingType<Dst>::type> Cast() const { in Cast()
116 friend U GetNumericValueForTest(const CheckedNumeric<U>& src);
120 constexpr CheckedNumeric& operator+=(const Src rhs);
122 constexpr CheckedNumeric& operator-=(const Src rhs);
124 constexpr CheckedNumeric& operator*=(const Src rhs);
126 constexpr CheckedNumeric& operator/=(const Src rhs);
128 constexpr CheckedNumeric& operator%=(const Src rhs);
130 constexpr CheckedNumeric& operator<<=(const Src rhs);
132 constexpr CheckedNumeric& operator>>=(const Src rhs);
134 constexpr CheckedNumeric& operator&=(const Src rhs);
136 constexpr CheckedNumeric& operator|=(const Src rhs);
138 constexpr CheckedNumeric& operator^=(const Src rhs);
140 constexpr CheckedNumeric operator-() const {
146 ? CheckedNumeric<T>(
155 constexpr CheckedNumeric operator~() const {
156 return CheckedNumeric<decltype(InvertWrapper(T()))>(
160 constexpr CheckedNumeric Abs() const { in Abs()
165 constexpr CheckedNumeric<typename MathWrapper<CheckedMaxOp, T, U>::type> Max( in Max()
171 return CheckedNumeric<result_type>( in Max()
180 constexpr CheckedNumeric<typename MathWrapper<CheckedMinOp, T, U>::type> Min( in Min()
186 return CheckedNumeric<result_type>( in Min()
197 constexpr CheckedNumeric<typename UnsignedOrFloatForSize<T>::type>
199 return CheckedNumeric<typename UnsignedOrFloatForSize<T>::type>( in UnsignedAbs()
203 constexpr CheckedNumeric& operator++() {
208 constexpr CheckedNumeric operator++(int) {
209 CheckedNumeric value = *this;
214 constexpr CheckedNumeric& operator--() {
219 constexpr CheckedNumeric operator--(int) {
220 CheckedNumeric value = *this;
230 static constexpr CheckedNumeric MathOp(const L lhs, const R rhs) { in MathOp()
236 return CheckedNumeric<T>(result, is_valid); in MathOp()
241 constexpr CheckedNumeric& MathOp(const R rhs) { in MathOp()
246 *this = CheckedNumeric<T>(result, is_valid); in MathOp()
253 CheckedNumeric FastRuntimeNegate() const { in FastRuntimeNegate()
256 return CheckedNumeric<T>(result, IsValid() && success); in FastRuntimeNegate()
260 constexpr CheckedNumeric(Src value, bool is_valid) in CheckedNumeric() function
272 struct Wrapper<CheckedNumeric<Src>> {
273 static constexpr bool is_valid(const CheckedNumeric<Src> v) {
276 static constexpr Src value(const CheckedNumeric<Src> v) {
292 constexpr bool IsValidForType(const CheckedNumeric<Src> value) {
298 const CheckedNumeric<Src> value) {
304 const CheckedNumeric<Src> value,
312 constexpr CheckedNumeric<typename UnderlyingType<T>::type> MakeCheckedNum(
321 constexpr CheckedNumeric<typename MathWrapper<M, L, R>::type> CheckMathOp(
325 return CheckedNumeric<typename Math::result_type>::template MathOp<M>(lhs,
334 constexpr CheckedNumeric<typename ResultType<M, L, R, Args...>::type>
373 using internal::CheckedNumeric;