Enumerations
enum IntegerRepresentation
| Name | Value |
|---|---|
| INTEGER_REPRESENTATION_UNSIGNED | 0 |
| INTEGER_REPRESENTATION_SIGNED | 1 |
Defined at line 131 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
enum NumericRangeRepresentation
| Name | Value |
|---|---|
| NUMERIC_RANGE_NOT_CONTAINED | 0 |
| NUMERIC_RANGE_CONTAINED | 1 |
A range for a given nunmeric Src type is contained for a given numeric Dst
type if both numeric_limits
<Src
>::max()
<
= numeric_limits
<Dst
>::max() and
numeric_limits
<Src
>::lowest() >= numeric_limits
<Dst
>::lowest() are true.
We implement this as template specializations rather than simple static
comparisons to ensure type correctness in our comparisons.
Defined at line 141 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
enum ArithmeticPromotionCategory
| Name | Value |
|---|---|
| LEFT_PROMOTION | 0 |
| RIGHT_PROMOTION | 1 |
Defined at line 443 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
enum NumericRepresentation
| Name | Value |
|---|---|
| NUMERIC_INTEGER | 0 |
| NUMERIC_FLOATING | 1 |
| NUMERIC_UNKNOWN | 2 |
Floats carry around their validity state with them, but integers do not. So,
we wrap the underlying value in a specialization in order to hide that detail
and expose an interface via accessors.
Defined at line 446 of file ../../third_party/mini_chromium/src/base/numerics/checked_math_impl.h
Records
-
class ArithmeticOrUnderlyingEnum -
class ArithmeticOrUnderlyingEnum -
class ArithmeticOrUnderlyingEnum -
class BigEnoughPromotion -
class BigEnoughPromotion -
class BigEnoughPromotion -
class BigEnoughPromotion -
class CheckOnFailure -
class CheckedAddFastOp -
class CheckedAddOp -
class CheckedAddOp -
class CheckedAddOp -
class CheckedAndOp -
class CheckedAndOp -
class CheckedDivOp -
class CheckedDivOp -
class CheckedDivOp -
class CheckedLshOp -
class CheckedLshOp -
class CheckedMaxOp -
class CheckedMaxOp -
class CheckedMinOp -
class CheckedMinOp -
class CheckedModOp -
class CheckedModOp -
class CheckedMulFastAsmOp -
class CheckedMulFastOp -
class CheckedMulOp -
class CheckedMulOp -
class CheckedMulOp -
class CheckedNumeric -
class CheckedNumericState -
class CheckedNumericState -
class CheckedNumericState -
class CheckedOrOp -
class CheckedOrOp -
class CheckedRshOp -
class CheckedRshOp -
class CheckedSubFastOp -
class CheckedSubOp -
class CheckedSubOp -
class CheckedSubOp -
class CheckedXorOp -
class CheckedXorOp -
class ClampedAddFastAsmOp -
class ClampedAddFastOp -
class ClampedAddOp -
class ClampedAddOp -
class ClampedAddOp -
class ClampedAndOp -
class ClampedAndOp -
class ClampedDivOp -
class ClampedDivOp -
class ClampedDivOp -
class ClampedLshOp -
class ClampedLshOp -
class ClampedMaxOp -
class ClampedMaxOp -
class ClampedMinOp -
class ClampedMinOp -
class ClampedModOp -
class ClampedModOp -
class ClampedMulFastAsmOp -
class ClampedMulFastOp -
class ClampedMulOp -
class ClampedMulOp -
class ClampedMulOp -
class ClampedNegFastOp -
class ClampedNumeric -
class ClampedOrOp -
class ClampedOrOp -
class ClampedRshOp -
class ClampedRshOp -
class ClampedSubFastAsmOp -
class ClampedSubFastOp -
class ClampedSubOp -
class ClampedSubOp -
class ClampedSubOp -
class ClampedXorOp -
class ClampedXorOp -
class DstRangeRelationToSrcRangeImpl -
class DstRangeRelationToSrcRangeImpl -
class DstRangeRelationToSrcRangeImpl -
class DstRangeRelationToSrcRangeImpl -
class DstRangeRelationToSrcRangeImpl -
class DstRangeRelationToSrcRangeImpl -
class ExtentImpl -
class ExtentImpl -
class ExtentImpl -
class ExtentImpl -
class FastIntegerArithmeticPromotion -
class FastIntegerArithmeticPromotion -
class FastIntegerArithmeticPromotion -
class GetNumericRepresentation -
class IntegerBitsPlusSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IntegerForDigitsAndSign -
class IsCheckedOp -
class IsClampedOp -
class IsEqual -
class IsGreater -
class IsGreaterOrEqual -
class IsIntegerArithmeticSafe -
class IsLess -
class IsLessOrEqual -
class IsNotEqual -
class IsNumericRangeContained -
class IsNumericRangeContained -
class IsStrictOp -
class IsTypeInRangeForNumericType -
class IsValueInRangeFastOp -
class IsValueInRangeFastOp -
class IsValueInRangeFastOp -
class LowestValuePromotion -
class LowestValuePromotion -
class LowestValuePromotion -
class MathWrapper -
class MaxExponent -
class MaxExponentPromotion -
class MaxExponentPromotion -
class MaxExponentPromotion -
class NarrowingRange -
class PositionOfSignBit -
class RangeCheck -
class ResultType -
class ResultType -
class SaturateFastAsmOp -
class SaturateFastOp -
class SaturateFastOp -
class SaturateFastOp -
class SaturationDefaultLimits -
class ScopedFDCloseTraits -
class ScopedFILECloser -
class StaticDstRangeRelationToSrcRange -
class StaticDstRangeRelationToSrcRange -
class StaticDstRangeRelationToSrcRange -
class StaticDstRangeRelationToSrcRange -
class StrictNumeric -
class TwiceWiderInteger -
class UnderlyingType -
class UnderlyingType -
class UnderlyingType -
class UnderlyingType -
class UnsignedOrFloatForSize -
class UnsignedOrFloatForSize -
class UnsignedOrFloatForSize -
class priority_tag -
class priority_tag
Functions
-
template <typename T>bool CheckedAddImpl (T x, T y, T * result)Defined at line 24 of file ../../third_party/mini_chromium/src/base/numerics/checked_math_impl.h
-
template <typename T, typename std::enable_if<std::is_integral<T>::value && std::is_signed<T>::value>::type* = nullptr>T SaturatedNegWrapper (T value)Defined at line 27 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math_impl.h
-
template <typename T, typename std::enable_if<std::is_integral<T>::value && !std::is_signed<T>::value>::type* = nullptr>T SaturatedNegWrapper (T value)Defined at line 38 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math_impl.h
-
template <typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>T SaturatedNegWrapper (T value)Defined at line 45 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math_impl.h
-
template <typename T, typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>T SaturatedAbsWrapper (T value)Defined at line 51 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math_impl.h
-
template <typename T, typename std::enable_if<std::is_signed<T>::value>::type* = nullptr>bool IsValueNegative (T value)Determines if a numeric value is negative without throwing compiler
warnings on: unsigned(value)
<
0.
Defined at line 53 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename T, typename std::enable_if<!std::is_signed<T>::value>::type* = nullptr>bool IsValueNegative (T )Defined at line 60 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>T SaturatedAbsWrapper (T value)Defined at line 67 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math_impl.h
-
template <typename T>typename std::make_signed<T>::type ConditionalNegate (T x, bool is_negative)This performs a fast negation, returning a signed value. It works on unsigned
arguments, but probably doesn't do what you want for any unsigned value
larger than max / 2 + 1 (i.e. signed min cast to unsigned).
Defined at line 69 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename T>typename std::make_unsigned<T>::type SafeUnsignedAbs (T value)This performs a safe, absolute value via unsigned overflow.
Defined at line 82 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename T>bool CheckedSubImpl (T x, T y, T * result)Defined at line 84 of file ../../third_party/mini_chromium/src/base/numerics/checked_math_impl.h
-
template <typename Dst, typename Src>bool IsValueInRangeForNumericType (Src value)Convenience function that returns true if the supplied value is in range
for the destination type.
Defined at line 88 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
bool CanDetectCompileTimeConstant ()Defined at line 91 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename T>bool IsCompileTimeConstant (const T v)Defined at line 95 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Dst, class CheckHandler = internal::CheckOnFailure, typename Src>Dst checked_cast (Src value)checked_cast
<
> is analogous to static_cast
<
> for numeric types,
except that it CHECKs that the specified numeric conversion will not
overflow or underflow. NaN source will always trigger a CHECK.
Defined at line 104 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <typename T>bool MustTreatAsConstexpr (const T v)Defined at line 108 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <size_t kExtent>size_t must_not_be_dynamic_extent ()must_not_be_dynamic_extent prevents |dynamic_extent| from being returned in a
constexpr context.
Defined at line 111 of file ../../third_party/mini_chromium/src/base/containers/span.h
-
template <typename T, typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>T NegateWrapper (T value)Wrap the unary operations to allow SFINAE when instantiating integrals versus
floating points. These don't perform any overflow checking. Rather, they
exhibit well-defined overflow semantics and rely on the caller to detect
if an overflow occured.
Defined at line 133 of file ../../third_party/mini_chromium/src/base/numerics/safe_math_shared_impl.h
-
template <typename Dst, template <typename> class S, typename Src>Dst saturated_cast_impl (Src value, RangeCheck constraint)Defined at line 138 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>T NegateWrapper (T value)Defined at line 142 of file ../../third_party/mini_chromium/src/base/numerics/safe_math_shared_impl.h
-
template <typename T>bool CheckedMulImpl (T x, T y, T * result)Defined at line 144 of file ../../third_party/mini_chromium/src/base/numerics/checked_math_impl.h
-
template <typename T, typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>typename std::make_unsigned<T>::type InvertWrapper (T value)Defined at line 148 of file ../../third_party/mini_chromium/src/base/numerics/safe_math_shared_impl.h
-
template <typename T, typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>T AbsWrapper (T value)Defined at line 154 of file ../../third_party/mini_chromium/src/base/numerics/safe_math_shared_impl.h
-
template <typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>T AbsWrapper (T value)Defined at line 161 of file ../../third_party/mini_chromium/src/base/numerics/safe_math_shared_impl.h
-
template <typename T>ClampedNumeric<typename UnderlyingType<T>::type> MakeClampedNum (const T value)Convience wrapper to return a new ClampedNumeric from the provided arithmetic
or ClampedNumericType.
Defined at line 190 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <typename T>std::ostream & operator<< (std::ostream & os, const ClampedNumeric<T> & value)Overload the ostream output operator to make logging work nicely.
Defined at line 197 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <typename Dst, template <typename> class SaturationHandler = SaturationDefaultLimits, typename Src>Dst saturated_cast (Src value)saturated_cast
<
> is analogous to static_cast
<
> for numeric types, except
that the specified numeric conversion will saturate by default rather than
overflow or underflow, and NaN assignment to an integral will return 0.
All boundary condition behaviors can be overriden with a custom handler.
Defined at line 201 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <template <typename, typename, typename> class M, typename L, typename R>ClampedNumeric<typename MathWrapper<M, L, R>::type> ClampMathOp (const L lhs, const R rhs)These implement the variadic wrapper for the math operations.
Defined at line 206 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <typename Dst, typename Src>Dst strict_cast (Src value)strict_cast
<
> is analogous to static_cast
<
> for numeric types, except that
it will cause a compile failure if the destination type is not large enough
to contain any value in the source type. It performs no runtime checking.
Defined at line 218 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <template <typename, typename, typename> class M, typename L, typename R, typename... Args>ClampedNumeric<typename ResultType<M, L, R, Args...>::type> ClampMathOp (const L lhs, const R rhs, const Args... args)General purpose wrapper template for arithmetic operations.
Defined at line 219 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedAddOp, L, R, Args...>::type> ClampAdd (const L lhs, const R rhs, const Args... args)Defined at line 224 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedAddOp, L, R>::type> operator+ (const L lhs, const R rhs)Defined at line 224 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedSubOp, L, R, Args...>::type> ClampSub (const L lhs, const R rhs, const Args... args)Defined at line 225 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedSubOp, L, R>::type> operator- (const L lhs, const R rhs)Defined at line 225 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedMulOp, L, R, Args...>::type> ClampMul (const L lhs, const R rhs, const Args... args)Defined at line 226 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedMulOp, L, R>::type> operator* (const L lhs, const R rhs)Defined at line 226 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedDivOp, L, R, Args...>::type> ClampDiv (const L lhs, const R rhs, const Args... args)Defined at line 227 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedDivOp, L, R>::type> operator/ (const L lhs, const R rhs)Defined at line 227 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedModOp, L, R, Args...>::type> ClampMod (const L lhs, const R rhs, const Args... args)Defined at line 228 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedModOp, L, R>::type> operator% (const L lhs, const R rhs)Defined at line 228 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedLshOp, L, R, Args...>::type> ClampLsh (const L lhs, const R rhs, const Args... args)Defined at line 229 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedLshOp, L, R>::type> operator<< (const L lhs, const R rhs)Defined at line 229 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedRshOp, L, R, Args...>::type> ClampRsh (const L lhs, const R rhs, const Args... args)Defined at line 230 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedRshOp, L, R>::type> operator>> (const L lhs, const R rhs)Defined at line 230 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedAndOp, L, R, Args...>::type> ClampAnd (const L lhs, const R rhs, const Args... args)Defined at line 231 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedAndOp, L, R>::type> operator& (const L lhs, const R rhs)Defined at line 231 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedOrOp, L, R, Args...>::type> ClampOr (const L lhs, const R rhs, const Args... args)Defined at line 232 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedOrOp, L, R>::type> operator| (const L lhs, const R rhs)Defined at line 232 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedXorOp, L, R, Args...>::type> ClampXor (const L lhs, const R rhs, const Args... args)Defined at line 233 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename MathWrapper<ClampedXorOp, L, R>::type> operator^ (const L lhs, const R rhs)Defined at line 233 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedMaxOp, L, R, Args...>::type> ClampMax (const L lhs, const R rhs, const Args... args)Defined at line 234 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >ClampedNumeric<typename ResultType<ClampedMinOp, L, R, Args...>::type> ClampMin (const L lhs, const R rhs, const Args... args)Defined at line 235 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >bool operator< (const L lhs, const R rhs)Defined at line 236 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >bool operator<= (const L lhs, const R rhs)Defined at line 237 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >bool operator> (const L lhs, const R rhs)Defined at line 238 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >bool operator>= (const L lhs, const R rhs)Defined at line 239 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >bool operator== (const L lhs, const R rhs)Defined at line 240 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <, , >bool operator!= (const L lhs, const R rhs)Defined at line 241 of file ../../third_party/mini_chromium/src/base/numerics/clamped_math.h
-
template <typename Dst, typename Src>bool IsValidForType (const CheckedNumeric<Src> value)Convenience functions to avoid the ugly template disambiguator syntax.
Defined at line 286 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename Dst, typename Src>StrictNumeric<Dst> ValueOrDieForType (const CheckedNumeric<Src> value)Defined at line 291 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename Dst, typename Src, typename Default>StrictNumeric<Dst> ValueOrDefaultForType (const CheckedNumeric<Src> value, const Default default_value)Defined at line 297 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename T>CheckedNumeric<typename UnderlyingType<T>::type> MakeCheckedNum (const T value)Convience wrapper to return a new CheckedNumeric from the provided arithmetic
or CheckedNumericType.
Defined at line 306 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename T>StrictNumeric<typename UnderlyingType<T>::type> MakeStrictNum (const T value)Convience wrapper returns a StrictNumeric from the provided arithmetic type.
Defined at line 306 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <typename T>std::ostream & operator<< (std::ostream & os, const StrictNumeric<T> & value)Overload the ostream output operator to make logging work nicely.
Defined at line 313 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <template <typename, typename, typename> class M, typename L, typename R>CheckedNumeric<typename MathWrapper<M, L, R>::type> CheckMathOp (const L lhs, const R rhs)These implement the variadic wrapper for the math operations.
Defined at line 315 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >bool operator< (const L lhs, const R rhs)Defined at line 327 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <, , >bool operator<= (const L lhs, const R rhs)Defined at line 328 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <template <typename, typename, typename> class M, typename L, typename R, typename... Args>CheckedNumeric<typename ResultType<M, L, R, Args...>::type> CheckMathOp (const L lhs, const R rhs, const Args... args)General purpose wrapper template for arithmetic operations.
Defined at line 328 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >bool operator> (const L lhs, const R rhs)Defined at line 329 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <, , >bool operator>= (const L lhs, const R rhs)Defined at line 330 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <, , >bool operator== (const L lhs, const R rhs)Defined at line 331 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <, , >bool operator!= (const L lhs, const R rhs)Defined at line 332 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedAddOp, L, R, Args...>::type> CheckAdd (const L lhs, const R rhs, const Args... args)Defined at line 333 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedAddOp, L, R>::type> operator+ (const L lhs, const R rhs)Defined at line 333 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedSubOp, L, R, Args...>::type> CheckSub (const L lhs, const R rhs, const Args... args)Defined at line 334 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedSubOp, L, R>::type> operator- (const L lhs, const R rhs)Defined at line 334 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedMulOp, L, R, Args...>::type> CheckMul (const L lhs, const R rhs, const Args... args)Defined at line 335 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedMulOp, L, R>::type> operator* (const L lhs, const R rhs)Defined at line 335 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedDivOp, L, R, Args...>::type> CheckDiv (const L lhs, const R rhs, const Args... args)Defined at line 336 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedModOp, L, R, Args...>::type> CheckMod (const L lhs, const R rhs, const Args... args)Defined at line 337 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedLshOp, L, R, Args...>::type> CheckLsh (const L lhs, const R rhs, const Args... args)Defined at line 338 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedRshOp, L, R, Args...>::type> CheckRsh (const L lhs, const R rhs, const Args... args)Defined at line 339 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedAndOp, L, R, Args...>::type> CheckAnd (const L lhs, const R rhs, const Args... args)Defined at line 340 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedOrOp, L, R, Args...>::type> CheckOr (const L lhs, const R rhs, const Args... args)Defined at line 341 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedXorOp, L, R, Args...>::type> CheckXor (const L lhs, const R rhs, const Args... args)Defined at line 342 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedMaxOp, L, R, Args...>::type> CheckMax (const L lhs, const R rhs, const Args... args)Defined at line 343 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename ResultType<CheckedMinOp, L, R, Args...>::type> CheckMin (const L lhs, const R rhs, const Args... args)Defined at line 344 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename U>U GetNumericValueForTest (const CheckedNumeric<U> & src)This friend method is available solely for providing more detailed logging
in the the tests. Do not implement it in production code, because the
underlying values may change at any time.
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedDivOp, L, R>::type> operator/ (const L lhs, const R rhs)Defined at line 336 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedModOp, L, R>::type> operator% (const L lhs, const R rhs)Defined at line 337 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedLshOp, L, R>::type> operator<< (const L lhs, const R rhs)Defined at line 338 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedRshOp, L, R>::type> operator>> (const L lhs, const R rhs)Defined at line 339 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedAndOp, L, R>::type> operator& (const L lhs, const R rhs)Defined at line 340 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedOrOp, L, R>::type> operator| (const L lhs, const R rhs)Defined at line 341 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <, , >CheckedNumeric<typename MathWrapper<CheckedXorOp, L, R>::type> operator^ (const L lhs, const R rhs)Defined at line 342 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename L, typename R>L * operator+ (L * lhs, const StrictNumeric<R> rhs)These are some extra StrictNumeric operators to support simple pointer
arithmetic with our result types. Since wrapping on a pointer is always
bad, we trigger the CHECK condition here.
Defined at line 350 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename L, typename R>L * operator- (L * lhs, const StrictNumeric<R> rhs)Defined at line 358 of file ../../third_party/mini_chromium/src/base/numerics/checked_math.h
-
template <typename Dst, template <typename> class Bounds = std::numeric_limits, typename Src>RangeCheck DstRangeRelationToSrcRange (Src value)Defined at line 402 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Src>typename std::make_signed<typename base::internal::UnderlyingType<Src>::type>::type as_signed (const Src value)as_signed
<
> returns the supplied integral value (or integral castable
Numeric template) cast as a signed integral of equivalent precision.
I.e. it's mostly an alias for: static_cast
<std
::make_signed
<T
>::type>(t)
Defined at line 670 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Src>typename std::make_unsigned<typename base::internal::UnderlyingType<Src>::type>::type as_unsigned (const Src value)as_unsigned
<
> returns the supplied integral value (or integral castable
Numeric template) cast as an unsigned integral of equivalent precision.
I.e. it's mostly an alias for: static_cast
<std
::make_unsigned
<T
>::type>(t)
Defined at line 682 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename L, typename R>bool IsLessImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)Defined at line 691 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename L, typename R>bool IsLessOrEqualImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)Defined at line 712 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename L, typename R>bool IsGreaterImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)Defined at line 733 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename L, typename R>bool IsGreaterOrEqualImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)Defined at line 754 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <template <typename, typename> class C, typename L, typename R>bool SafeCompare (const L lhs, const R rhs)These perform the actual math operations on the CheckedNumerics.
Binary arithmetic operations.
Defined at line 801 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Dst, typename Src>bool IsMaxInRangeForNumericType ()Defined at line 816 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Dst, typename Src>bool IsMinInRangeForNumericType ()Defined at line 822 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Dst, typename Src>Dst CommonMax ()Defined at line 828 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Dst, typename Src>Dst CommonMin ()Defined at line 835 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <typename Dst, typename Src = Dst>Dst CommonMaxOrMin (bool is_min)This is a wrapper to generate return the max or min for a supplied type.
If the argument is false, the returned value is the maximum. If true the
returned value is the minimum.
Defined at line 845 of file ../../third_party/mini_chromium/src/base/numerics/safe_conversions_impl.h
-
template <class Tclass Usize_t Nsize_t M>bool span_cmp (span<T, N> lspan<U, M> r)Template helper for implementing operator==.
Defined at line 1408 of file ../../third_party/mini_chromium/src/base/containers/span.h
Concepts
template <typename T> IntegralConstantLike std::is_integral_v<decltype(T::value)> && !std::is_same_v<_Bool, std::remove_const_t<decltype(T::value)> > && std::convertible_to<T, decltype(T::value)> && std::equality_comparable_with<T, decltype(T::value)> && std::bool_constant<T() == T::value>::value && std::bool_constant<static_cast<decltype(T::value)>(T()) == T::value>::value
Defined at line 46 of file ../../third_party/mini_chromium/src/base/containers/span.h
template <typename From, typename To> LegalDataConversion std::convertible_to<std::remove_reference_t<From> (*)[], std::remove_reference_t<To> (*)[]>
Defined at line 61 of file ../../third_party/mini_chromium/src/base/containers/span.h
template <typename T, typename It> CompatibleIter std::contiguous_iterator<It> && LegalDataConversion<std::iter_reference_t<It>, T>
Defined at line 66 of file ../../third_party/mini_chromium/src/base/containers/span.h
template <typename T, typename R> CompatibleRange std::ranges::contiguous_range<R> && std::ranges::sized_range<R> && LegalDataConversion<std::ranges::range_reference_t<R>, T> && (std::ranges::borrowed_range<R> || std::is_const_v<T>)
Defined at line 70 of file ../../third_party/mini_chromium/src/base/containers/span.h
template <typename Ttypename R> LegacyCompatibleRange requires (R &r) { { * std::ranges::data(r) } -> LegalDataConversion<T>; std::ranges::size(r); }
NOTE: Ideally we'd just use `CompatibleRange`, however this currently breaks
code that was written prior to C++20 being standardized and assumes providing
.data() and .size() is sufficient.
TODO: https://crbug.com/1504998 - Remove in favor of CompatibleRange and fix
callsites.
Defined at line 81 of file ../../third_party/mini_chromium/src/base/containers/span.h
Variables
const size_t MaybeStaticExt
Defined at line 56 of file ../../third_party/mini_chromium/src/base/containers/span.h
const size_t MaybeStaticExt
Defined at line 57 of file ../../third_party/mini_chromium/src/base/containers/span.h
const size_t ExtentV
Defined at line 106 of file ../../third_party/mini_chromium/src/base/containers/span.h