Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Enumerations | Functions
safe_conversions_impl.h File Reference
#include <cstdint>
#include <limits>
#include <type_traits>

Go to the source code of this file.

Classes

struct  base::internal::MaxExponent< NumericType >
 
struct  base::internal::IntegerBitsPlusSign< NumericType >
 
struct  base::internal::PositionOfSignBit< Integer >
 
struct  base::internal::CheckOnFailure
 
struct  base::internal::StaticDstRangeRelationToSrcRange< Dst, Src, Sign, Sign >
 
struct  base::internal::StaticDstRangeRelationToSrcRange< Dst, Src, INTEGER_REPRESENTATION_SIGNED, INTEGER_REPRESENTATION_UNSIGNED >
 
struct  base::internal::StaticDstRangeRelationToSrcRange< Dst, Src, INTEGER_REPRESENTATION_UNSIGNED, INTEGER_REPRESENTATION_SIGNED >
 
class  base::internal::RangeCheck
 
struct  base::internal::NarrowingRange< Dst, Src, Bounds >
 
struct  base::internal::DstRangeRelationToSrcRangeImpl< Dst, Src, Bounds, DstSign, SrcSign, NUMERIC_RANGE_CONTAINED >
 
struct  base::internal::DstRangeRelationToSrcRangeImpl< Dst, Src, Bounds, INTEGER_REPRESENTATION_SIGNED, INTEGER_REPRESENTATION_SIGNED, NUMERIC_RANGE_NOT_CONTAINED >
 
struct  base::internal::DstRangeRelationToSrcRangeImpl< Dst, Src, Bounds, INTEGER_REPRESENTATION_UNSIGNED, INTEGER_REPRESENTATION_UNSIGNED, NUMERIC_RANGE_NOT_CONTAINED >
 
struct  base::internal::DstRangeRelationToSrcRangeImpl< Dst, Src, Bounds, INTEGER_REPRESENTATION_SIGNED, INTEGER_REPRESENTATION_UNSIGNED, NUMERIC_RANGE_NOT_CONTAINED >
 
struct  base::internal::DstRangeRelationToSrcRangeImpl< Dst, Src, Bounds, INTEGER_REPRESENTATION_UNSIGNED, INTEGER_REPRESENTATION_SIGNED, NUMERIC_RANGE_NOT_CONTAINED >
 
struct  base::internal::IsTypeInRangeForNumericType< Dst, Src >
 
struct  base::internal::TwiceWiderInteger< Integer, IsSigned >
 
struct  base::internal::MaxExponentPromotion< Lhs, Rhs, LEFT_PROMOTION >
 
struct  base::internal::MaxExponentPromotion< Lhs, Rhs, RIGHT_PROMOTION >
 
struct  base::internal::LowestValuePromotion< Lhs, Rhs, LEFT_PROMOTION >
 
struct  base::internal::LowestValuePromotion< Lhs, Rhs, RIGHT_PROMOTION >
 
struct  base::internal::BigEnoughPromotion< Lhs, Rhs, is_intmax_type, true >
 
struct  base::internal::BigEnoughPromotion< Lhs, Rhs, false, false >
 
struct  base::internal::BigEnoughPromotion< Lhs, Rhs, true, false >
 
struct  base::internal::IsIntegerArithmeticSafe< T, Lhs, Rhs >
 
struct  base::internal::FastIntegerArithmeticPromotion< Lhs, Rhs, true >
 
struct  base::internal::FastIntegerArithmeticPromotion< Lhs, Rhs, false >
 
struct  base::internal::ArithmeticOrUnderlyingEnum< T, true >
 
struct  base::internal::ArithmeticOrUnderlyingEnum< T, false >
 
struct  base::internal::UnderlyingType< T >
 
struct  base::internal::UnderlyingType< CheckedNumeric< T > >
 
struct  base::internal::UnderlyingType< ClampedNumeric< T > >
 
struct  base::internal::UnderlyingType< StrictNumeric< T > >
 
struct  base::internal::IsCheckedOp< L, R >
 
struct  base::internal::IsClampedOp< L, R >
 
struct  base::internal::IsStrictOp< L, R >
 
struct  base::internal::IsLess< L, R >
 
struct  base::internal::IsLessOrEqual< L, R >
 
struct  base::internal::IsGreater< L, R >
 
struct  base::internal::IsGreaterOrEqual< L, R >
 
struct  base::internal::IsEqual< L, R >
 
struct  base::internal::IsNotEqual< L, R >
 

Namespaces

namespace  base
 
namespace  base::internal
 

Macros

#define BASE_NUMERICS_LIKELY(x)   (x)
 
#define BASE_NUMERICS_UNLIKELY(x)   (x)
 
#define INTEGER_FOR_DIGITS_AND_SIGN(I)
 

Enumerations

enum  base::internal::IntegerRepresentation { base::internal::INTEGER_REPRESENTATION_UNSIGNED , base::internal::INTEGER_REPRESENTATION_SIGNED }
 
enum  base::internal::NumericRangeRepresentation { base::internal::NUMERIC_RANGE_NOT_CONTAINED , base::internal::NUMERIC_RANGE_CONTAINED }
 
enum  base::internal::ArithmeticPromotionCategory { base::internal::LEFT_PROMOTION , base::internal::RIGHT_PROMOTION }
 

Functions

template<typename T , typename std::enable_if< std::is_signed< T >::value >::type * = nullptr>
constexpr bool base::internal::IsValueNegative (T value)
 
template<typename T >
constexpr std::make_signed< T >::type base::internal::ConditionalNegate (T x, bool is_negative)
 
template<typename T >
constexpr std::make_unsigned< T >::type base::internal::SafeUnsignedAbs (T value)
 
constexpr bool base::internal::CanDetectCompileTimeConstant ()
 
template<typename T >
constexpr bool base::internal::IsCompileTimeConstant (const T)
 
template<typename T >
constexpr bool base::internal::MustTreatAsConstexpr (const T v)
 
template<typename Dst , template< typename > class Bounds = std::numeric_limits, typename Src >
constexpr RangeCheck base::internal::DstRangeRelationToSrcRange (Src value)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (int8_t)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (uint8_t)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (int16_t)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (uint16_t)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (int32_t)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (uint32_t)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (int64_t)
 
 base::internal::INTEGER_FOR_DIGITS_AND_SIGN (uint64_t)
 
template<typename Src >
constexpr std::make_signed< typenamebase::internal::UnderlyingType< Src >::type >::type base::internal::as_signed (const Src value)
 
template<typename Src >
constexpr std::make_unsigned< typenamebase::internal::UnderlyingType< Src >::type >::type base::internal::as_unsigned (const Src value)
 
template<typename L , typename R >
constexpr bool base::internal::IsLessImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)
 
template<typename L , typename R >
constexpr bool base::internal::IsLessOrEqualImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)
 
template<typename L , typename R >
constexpr bool base::internal::IsGreaterImpl (const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)
 
template<typename L , typename R >
constexpr bool base::internal::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 base::internal::SafeCompare (const L lhs, const R rhs)
 
template<typename Dst , typename Src >
constexpr bool base::internal::IsMaxInRangeForNumericType ()
 
template<typename Dst , typename Src >
constexpr bool base::internal::IsMinInRangeForNumericType ()
 
template<typename Dst , typename Src >
constexpr Dst base::internal::CommonMax ()
 
template<typename Dst , typename Src >
constexpr Dst base::internal::CommonMin ()
 
template<typename Dst , typename Src = Dst>
constexpr Dst base::internal::CommonMaxOrMin (bool is_min)
 

Macro Definition Documentation

◆ BASE_NUMERICS_LIKELY

#define BASE_NUMERICS_LIKELY (   x)    (x)

Definition at line 16 of file safe_conversions_impl.h.

◆ BASE_NUMERICS_UNLIKELY

#define BASE_NUMERICS_UNLIKELY (   x)    (x)

Definition at line 17 of file safe_conversions_impl.h.

◆ INTEGER_FOR_DIGITS_AND_SIGN

#define INTEGER_FOR_DIGITS_AND_SIGN (   I)
Value:

Definition at line 413 of file safe_conversions_impl.h.