#ifndef CORE_FXCRT_NUMERICS_CLAMPED_MATH_IMPL_H_
#define CORE_FXCRT_NUMERICS_CLAMPED_MATH_IMPL_H_
#include <stddef.h>
#include <stdint.h>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <limits>
#include <type_traits>
#include "core/fxcrt/numerics/checked_math.h"
#include "core/fxcrt/numerics/safe_conversions.h"
#include "core/fxcrt/numerics/safe_math_shared_impl.h"
namespace pdfium {
namespace internal {
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 &&
!std::is_signed<T>::value>::type* = nullptr>
constexpr T SaturatedNegWrapper(T value) { … }
template <
typename T,
typename std::enable_if<std::is_floating_point<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 T,
typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
constexpr T SaturatedAbsWrapper(T value) { … }
template <typename T, typename U, class Enable = void>
struct ClampedAddOp { … };
ClampedAddOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedSubOp { … };
ClampedSubOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedMulOp { … };
ClampedMulOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedDivOp { … };
ClampedDivOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedModOp { … };
ClampedModOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedLshOp { … };
ClampedLshOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedRshOp { … };
ClampedRshOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedAndOp { … };
ClampedAndOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedOrOp { … };
ClampedOrOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedXorOp { … };
ClampedXorOp<T, U, typename std::enable_if<std::is_integral<T>::value && std::is_integral<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedMaxOp { … };
ClampedMaxOp<T, U, typename std::enable_if<std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>::type>;
template <typename T, typename U, class Enable = void>
struct ClampedMinOp { … };
ClampedMinOp<T, U, typename std::enable_if<std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>::type>;
#define BASE_FLOAT_ARITHMETIC_OPS …
BASE_FLOAT_ARITHMETIC_OPS
BASE_FLOAT_ARITHMETIC_OPS
BASE_FLOAT_ARITHMETIC_OPS
BASE_FLOAT_ARITHMETIC_OPS
#undef BASE_FLOAT_ARITHMETIC_OPS
}
}
#endif