Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
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 > Struct Template Reference

#include <safe_conversions.h>

Static Public Member Functions

static constexpr bool Do (Src value)
 

Static Public Attributes

static constexpr bool is_supported = true
 

Detailed Description

template<typename Dst, typename Src>
struct 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 >

Definition at line 54 of file safe_conversions.h.

Member Function Documentation

◆ Do()

template<typename Dst , typename Src >
static constexpr bool 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 ( Src  value)
inlinestaticconstexpr

Definition at line 63 of file safe_conversions.h.

63 {
64 // Just downcast to the smaller type, sign extend it back to the original
65 // type, and then see if it matches the original value.
66 return value == static_cast<Dst>(value);
67 }
uint8_t value

Member Data Documentation

◆ is_supported

template<typename Dst , typename Src >
constexpr bool 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 >::is_supported = true
staticconstexpr

Definition at line 61 of file safe_conversions.h.


The documentation for this struct was generated from the following file: