Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
base::internal::CheckedModOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type > Struct Template Reference

#include <checked_math_impl.h>

Public Types

using result_type = typename MaxExponentPromotion< T, U >::type
 

Static Public Member Functions

template<typename V >
static constexpr bool Do (T x, U y, V *result)
 

Detailed Description

template<typename T, typename U>
struct base::internal::CheckedModOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >

Definition at line 246 of file checked_math_impl.h.

Member Typedef Documentation

◆ result_type

template<typename T , typename U >
using base::internal::CheckedModOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::result_type = typename MaxExponentPromotion<T, U>::type

Definition at line 250 of file checked_math_impl.h.

Member Function Documentation

◆ Do()

template<typename T , typename U >
template<typename V >
static constexpr bool base::internal::CheckedModOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do ( T  x,
y,
V result 
)
inlinestaticconstexpr

Definition at line 252 of file checked_math_impl.h.

252 {
254 return false;
255
256 using Promotion = typename BigEnoughPromotion<T, U>::type;
258 (std::is_signed<T>::value && std::is_signed<U>::value &&
260 static_cast<Promotion>(x) ==
261 std::numeric_limits<Promotion>::lowest() &&
262 y == static_cast<U>(-1)))) {
263 *result = 0;
264 return true;
265 }
266
267 Promotion presult = static_cast<Promotion>(x) % static_cast<Promotion>(y);
268 *result = static_cast<Promotion>(presult);
269 return IsValueInRangeForNumericType<V>(presult);
270 }
GAsyncResult * result
double y
double x
#define BASE_NUMERICS_UNLIKELY(x)

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