Enumerations | |
| enum | NumericRepresentation { NUMERIC_INTEGER , NUMERIC_FLOATING , NUMERIC_UNKNOWN } |
| enum | IntegerRepresentation { INTEGER_REPRESENTATION_UNSIGNED , INTEGER_REPRESENTATION_SIGNED } |
| enum | NumericRangeRepresentation { NUMERIC_RANGE_NOT_CONTAINED , NUMERIC_RANGE_CONTAINED } |
| enum | ArithmeticPromotionCategory { LEFT_PROMOTION , RIGHT_PROMOTION } |
Functions | |
| template<typename Dst , typename Src > | |
| constexpr bool | IsValidForType (const CheckedNumeric< Src > value) |
| template<typename Dst , typename Src > | |
| constexpr StrictNumeric< Dst > | ValueOrDieForType (const CheckedNumeric< Src > value) |
| template<typename Dst , typename Src , typename Default > | |
| constexpr StrictNumeric< Dst > | ValueOrDefaultForType (const CheckedNumeric< Src > value, const Default default_value) |
| template<typename T > | |
| constexpr CheckedNumeric< typename UnderlyingType< T >::type > | MakeCheckedNum (const T value) |
| template<template< typename, typename, typename > class M, typename L , typename R > | |
| constexpr CheckedNumeric< typename MathWrapper< M, L, R >::type > | CheckMathOp (const L lhs, const R rhs) |
| template<template< typename, typename, typename > class M, typename L , typename R , typename... Args> | |
| constexpr CheckedNumeric< typename ResultType< M, L, R, Args... >::type > | CheckMathOp (const L lhs, const R rhs, const Args... args) |
| template<typename L , typename R > | |
| L * | operator+ (L *lhs, const StrictNumeric< R > rhs) |
| template<typename L , typename R > | |
| L * | operator- (L *lhs, const StrictNumeric< R > rhs) |
| template<typename T > | |
| constexpr bool | CheckedAddImpl (T x, T y, T *result) |
| template<typename T > | |
| constexpr bool | CheckedSubImpl (T x, T y, T *result) |
| template<typename T > | |
| constexpr bool | CheckedMulImpl (T x, T y, T *result) |
| template<typename T > | |
| constexpr ClampedNumeric< typename UnderlyingType< T >::type > | MakeClampedNum (const T value) |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &os, const ClampedNumeric< T > &value) |
| template<template< typename, typename, typename > class M, typename L , typename R > | |
| constexpr ClampedNumeric< typename MathWrapper< M, L, R >::type > | ClampMathOp (const L lhs, const R rhs) |
| template<template< typename, typename, typename > class M, typename L , typename R , typename... Args> | |
| constexpr ClampedNumeric< typename ResultType< M, L, R, Args... >::type > | ClampMathOp (const L lhs, const R rhs, const Args... args) |
| template<typename T , typename std::enable_if< std::is_integral< T >::value &&std::is_signed< T >::value >::type * = nullptr> | |
| constexpr T | SaturatedNegWrapper (T value) |
| template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr> | |
| constexpr T | SaturatedAbsWrapper (T value) |
| template<typename Dst , typename Src > | |
| constexpr bool | IsValueInRangeForNumericType (Src value) |
| template<typename Dst , class CheckHandler = internal::CheckOnFailure, typename Src > | |
| constexpr Dst | checked_cast (Src value) |
| template<typename Dst , template< typename > class S, typename Src > | |
| constexpr Dst | saturated_cast_impl (Src value, RangeCheck constraint) |
| template<typename Dst , template< typename > class SaturationHandler = SaturationDefaultLimits, typename Src > | |
| constexpr Dst | saturated_cast (Src value) |
| template<typename Dst , typename Src > | |
| constexpr Dst | strict_cast (Src value) |
| template<typename T > | |
| constexpr StrictNumeric< typename UnderlyingType< T >::type > | MakeStrictNum (const T value) |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &os, const StrictNumeric< T > &value) |
| template<typename T , typename std::enable_if< std::is_signed< T >::value >::type * = nullptr> | |
| constexpr bool | IsValueNegative (T value) |
| template<typename T > | |
| constexpr std::make_signed< T >::type | ConditionalNegate (T x, bool is_negative) |
| template<typename T > | |
| constexpr std::make_unsigned< T >::type | SafeUnsignedAbs (T value) |
| constexpr bool | CanDetectCompileTimeConstant () |
| template<typename T > | |
| constexpr bool | IsCompileTimeConstant (const T) |
| template<typename T > | |
| constexpr bool | MustTreatAsConstexpr (const T v) |
| template<typename Dst , template< typename > class Bounds = std::numeric_limits, typename Src > | |
| constexpr RangeCheck | DstRangeRelationToSrcRange (Src value) |
| INTEGER_FOR_DIGITS_AND_SIGN (int8_t) | |
| INTEGER_FOR_DIGITS_AND_SIGN (uint8_t) | |
| INTEGER_FOR_DIGITS_AND_SIGN (int16_t) | |
| INTEGER_FOR_DIGITS_AND_SIGN (uint16_t) | |
| INTEGER_FOR_DIGITS_AND_SIGN (int32_t) | |
| INTEGER_FOR_DIGITS_AND_SIGN (uint32_t) | |
| INTEGER_FOR_DIGITS_AND_SIGN (int64_t) | |
| INTEGER_FOR_DIGITS_AND_SIGN (uint64_t) | |
| template<typename Src > | |
| constexpr std::make_signed< typenamebase::internal::UnderlyingType< Src >::type >::type | as_signed (const Src value) |
| template<typename Src > | |
| constexpr std::make_unsigned< typenamebase::internal::UnderlyingType< Src >::type >::type | as_unsigned (const Src value) |
| template<typename L , typename R > | |
| constexpr bool | IsLessImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range) |
| template<typename L , typename R > | |
| constexpr bool | IsLessOrEqualImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range) |
| template<typename L , typename R > | |
| constexpr bool | IsGreaterImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range) |
| template<typename L , typename R > | |
| constexpr bool | IsGreaterOrEqualImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range) |
| template<template< typename, typename > class C, typename L , typename R > | |
| constexpr bool | SafeCompare (const L lhs, const R rhs) |
| template<typename Dst , typename Src > | |
| constexpr bool | IsMaxInRangeForNumericType () |
| template<typename Dst , typename Src > | |
| constexpr bool | IsMinInRangeForNumericType () |
| template<typename Dst , typename Src > | |
| constexpr Dst | CommonMax () |
| template<typename Dst , typename Src > | |
| constexpr Dst | CommonMin () |
| template<typename Dst , typename Src = Dst> | |
| constexpr Dst | CommonMaxOrMin (bool is_min) |
| template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr> | |
| constexpr T | NegateWrapper (T value) |
| template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr> | |
| constexpr std::make_unsigned< T >::type | InvertWrapper (T value) |
| template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr> | |
| constexpr T | AbsWrapper (T value) |
| Enumerator | |
|---|---|
| LEFT_PROMOTION | |
| RIGHT_PROMOTION | |
Definition at line 443 of file safe_conversions_impl.h.
| Enumerator | |
|---|---|
| INTEGER_REPRESENTATION_UNSIGNED | |
| INTEGER_REPRESENTATION_SIGNED | |
Definition at line 129 of file safe_conversions_impl.h.
| Enumerator | |
|---|---|
| NUMERIC_RANGE_NOT_CONTAINED | |
| NUMERIC_RANGE_CONTAINED | |
Definition at line 139 of file safe_conversions_impl.h.
| Enumerator | |
|---|---|
| NUMERIC_INTEGER | |
| NUMERIC_FLOATING | |
| NUMERIC_UNKNOWN | |
Definition at line 455 of file checked_math_impl.h.
|
constexpr |
Definition at line 159 of file safe_math_shared_impl.h.
References SafeUnsignedAbs(), and value.
|
constexpr |
Definition at line 672 of file safe_conversions_impl.h.
References as_signed(), and value.
Referenced by as_signed().
|
constexpr |
Definition at line 684 of file safe_conversions_impl.h.
References as_unsigned(), and value.
Referenced by as_unsigned(), base::internal::IsValueInRangeFastOp< Dst, Src, typename std::enable_if< std::is_integral< Dst >::value &&std::is_integral< Src >::value &&!std::is_signed< Dst >::value &&std::is_signed< Src >::value &&!IsTypeInRangeForNumericType< Dst, Src >::value >::type >::Do(), base::internal::ClampedLshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedRshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::CheckedLshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), and base::internal::CheckedRshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do().
|
constexpr |
Definition at line 97 of file safe_conversions_impl.h.
Referenced by MustTreatAsConstexpr().
|
constexpr |
Definition at line 107 of file safe_conversions.h.
References BASE_NUMERICS_LIKELY, checked_cast(), and value.
Referenced by checked_cast().
|
constexpr |
Definition at line 23 of file checked_math_impl.h.
|
constexpr |
Definition at line 143 of file checked_math_impl.h.
References SafeUnsignedAbs(), x, and y.
|
constexpr |
Definition at line 83 of file checked_math_impl.h.
|
constexpr |
Definition at line 320 of file checked_math.h.
|
constexpr |
|
constexpr |
Definition at line 207 of file clamped_math.h.
|
constexpr |
Definition at line 221 of file clamped_math.h.
References args.
|
constexpr |
Definition at line 824 of file safe_conversions_impl.h.
|
constexpr |
Definition at line 841 of file safe_conversions_impl.h.
|
constexpr |
Definition at line 831 of file safe_conversions_impl.h.
|
constexpr |
Definition at line 67 of file safe_conversions_impl.h.
References x.
Referenced by base::internal::NarrowingRange< Dst, Src, Bounds >::Adjust().
|
constexpr |
Definition at line 402 of file safe_conversions_impl.h.
References value.
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | int16_t | ) |
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | int32_t | ) |
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | int64_t | ) |
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | int8_t | ) |
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | uint16_t | ) |
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | uint32_t | ) |
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | uint64_t | ) |
| base::internal::INTEGER_FOR_DIGITS_AND_SIGN | ( | uint8_t | ) |
|
constexpr |
Definition at line 153 of file safe_math_shared_impl.h.
Referenced by base::internal::CheckedNumeric< T >::operator~(), and base::internal::ClampedNumeric< T >::operator~().
|
constexpr |
Definition at line 101 of file safe_conversions_impl.h.
Referenced by MustTreatAsConstexpr(), and saturated_cast().
|
constexpr |
Definition at line 731 of file safe_conversions_impl.h.
References base::internal::RangeCheck::IsOverflow(), and base::internal::RangeCheck::IsUnderflow().
Referenced by base::internal::IsGreater< L, R >::Test().
|
constexpr |
Definition at line 751 of file safe_conversions_impl.h.
References base::internal::RangeCheck::IsOverflow(), and base::internal::RangeCheck::IsUnderflow().
Referenced by base::internal::IsGreaterOrEqual< L, R >::Test().
|
constexpr |
Definition at line 691 of file safe_conversions_impl.h.
References base::internal::RangeCheck::IsOverflow(), and base::internal::RangeCheck::IsUnderflow().
Referenced by base::internal::IsLess< L, R >::Test().
|
constexpr |
Definition at line 711 of file safe_conversions_impl.h.
References base::internal::RangeCheck::IsOverflow(), and base::internal::RangeCheck::IsUnderflow().
Referenced by base::internal::IsLessOrEqual< L, R >::Test().
|
constexpr |
Definition at line 812 of file safe_conversions_impl.h.
References base::internal::IsGreaterOrEqual< L, R >::Test().
|
constexpr |
Definition at line 818 of file safe_conversions_impl.h.
References base::internal::IsLessOrEqual< L, R >::Test().
|
constexpr |
Definition at line 291 of file checked_math.h.
References IsValidForType(), and value.
Referenced by IsValidForType().
|
constexpr |
Definition at line 91 of file safe_conversions.h.
References base::internal::IsValueInRangeFastOp< Dst, Src, Enable >::Do(), IsValueInRangeForNumericType(), and value.
Referenced by base::internal::CheckedNumericState< T, NUMERIC_FLOATING >::CheckedNumericState(), base::internal::CheckedNumericState< T, NUMERIC_INTEGER >::CheckedNumericState(), base::internal::CheckedNumericState< T, NUMERIC_FLOATING >::CheckedNumericState(), base::internal::CheckedNumericState< T, NUMERIC_INTEGER >::CheckedNumericState(), and IsValueInRangeForNumericType().
|
constexpr |
Definition at line 51 of file safe_conversions_impl.h.
References IsValueNegative(), and value.
Referenced by base::internal::ClampedMulFastAsmOp< T, U >::__attribute__(), base::internal::CheckedNumeric< T >::Abs(), base::internal::NarrowingRange< Dst, Src, Bounds >::Adjust(), base::internal::SaturateFastOp< Dst, Src, typename std::enable_if< std::is_integral< Src >::value &&std::is_integral< Dst >::value &&!SaturateFastAsmOp< Dst, Src >::is_supported >::type >::Do(), base::internal::ClampedLshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedRshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::CheckedLshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedAddOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedSubOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedMulOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedDivOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), IsValueNegative(), and SafeUnsignedAbs().
|
constexpr |
Definition at line 311 of file checked_math.h.
References MakeCheckedNum(), and value.
Referenced by MakeCheckedNum().
|
constexpr |
Definition at line 189 of file clamped_math.h.
References MakeClampedNum(), and value.
Referenced by MakeClampedNum().
|
constexpr |
Definition at line 312 of file safe_conversions.h.
References MakeStrictNum(), and value.
Referenced by MakeStrictNum().
|
constexpr |
Definition at line 106 of file safe_conversions_impl.h.
References CanDetectCompileTimeConstant(), and IsCompileTimeConstant().
Referenced by base::internal::CheckedNumericState< T, NUMERIC_FLOATING >::is_valid(), base::internal::CheckedNumeric< T >::operator-(), and SaturatedNegWrapper().
|
constexpr |
Definition at line 138 of file safe_math_shared_impl.h.
References value.
Referenced by base::internal::CheckedNumeric< T >::operator-(), and SaturatedNegWrapper().
| L * base::internal::operator+ | ( | L * | lhs, |
| const StrictNumeric< R > | rhs | ||
| ) |
Definition at line 355 of file checked_math.h.
| L * base::internal::operator- | ( | L * | lhs, |
| const StrictNumeric< R > | rhs | ||
| ) |
Definition at line 363 of file checked_math.h.
| std::ostream & base::internal::operator<< | ( | std::ostream & | os, |
| const ClampedNumeric< T > & | value | ||
| ) |
Definition at line 197 of file clamped_math.h.
References value.
| std::ostream & base::internal::operator<< | ( | std::ostream & | os, |
| const StrictNumeric< T > & | value | ||
| ) |
Definition at line 320 of file safe_conversions.h.
References value.
|
constexpr |
Definition at line 797 of file safe_conversions_impl.h.
|
constexpr |
Definition at line 79 of file safe_conversions_impl.h.
References IsValueNegative(), SafeUnsignedAbs(), and value.
Referenced by AbsWrapper(), base::internal::NarrowingRange< Dst, Src, Bounds >::Adjust(), CheckedMulImpl(), SafeUnsignedAbs(), SaturatedAbsWrapper(), base::internal::CheckedNumeric< T >::UnsignedAbs(), and base::internal::ClampedNumeric< T >::UnsignedAbs().
|
constexpr |
Definition at line 206 of file safe_conversions.h.
References base::internal::SaturateFastOp< Dst, Src, Enable >::Do(), IsCompileTimeConstant(), saturated_cast(), and value.
Referenced by base::internal::ClampedNumeric< T >::ClampedNumeric(), base::internal::ClampedNumeric< T >::ClampedNumeric(), base::internal::ClampedNumeric< T >::ClampedNumeric(), and saturated_cast().
|
constexpr |
Definition at line 141 of file safe_conversions.h.
References base::internal::RangeCheck::IsOverflowFlagSet(), base::internal::RangeCheck::IsUnderflowFlagSet(), and value.
|
constexpr |
Definition at line 50 of file clamped_math_impl.h.
References SafeUnsignedAbs(), and value.
Referenced by base::internal::ClampedNumeric< T >::Abs().
|
constexpr |
Definition at line 26 of file clamped_math_impl.h.
References base::internal::ClampedNegFastOp< T >::Do(), MustTreatAsConstexpr(), NegateWrapper(), and value.
Referenced by base::internal::ClampedNumeric< T >::operator-().
|
constexpr |
Definition at line 223 of file safe_conversions.h.
References NUMERIC_RANGE_CONTAINED, strict_cast(), and value.
Referenced by strict_cast(), base::internal::StrictNumeric< T >::StrictNumeric(), and base::internal::StrictNumeric< T >::StrictNumeric().
|
constexpr |
Definition at line 302 of file checked_math.h.
References value, and ValueOrDefaultForType().
Referenced by ValueOrDefaultForType().
|
constexpr |
Definition at line 296 of file checked_math.h.
References value, and ValueOrDieForType().
Referenced by ValueOrDieForType().