Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
safe_math_shared_impl.h File Reference

(08e24b2ba6847221abd35e9b994206b764d6b322)

#include <stddef.h>
#include <stdint.h>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <limits>
#include <type_traits>
#include "build/build_config.h"
#include "core/fxcrt/numerics/safe_conversions.h"
Include dependency graph for safe_math_shared_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pdfium::internal::CheckedAddFastOp< T, U >
struct  pdfium::internal::CheckedSubFastOp< T, U >
struct  pdfium::internal::CheckedMulFastOp< T, U >
struct  pdfium::internal::ClampedAddFastOp< T, U >
struct  pdfium::internal::ClampedSubFastOp< T, U >
struct  pdfium::internal::ClampedMulFastOp< T, U >
struct  pdfium::internal::ClampedNegFastOp< T >
struct  pdfium::internal::UnsignedOrFloatForSize< Numeric, true, false >
struct  pdfium::internal::UnsignedOrFloatForSize< Numeric, false, true >
struct  pdfium::internal::MathWrapper< M, L, R >

Namespaces

namespace  pdfium
namespace  pdfium::internal

Macros

#define BASE_HAS_OPTIMIZED_SAFE_MATH   (0)
#define BASE_NUMERIC_ARITHMETIC_VARIADIC(CLASS, CL_ABBR, OP_NAME)
#define BASE_NUMERIC_ARITHMETIC_OPERATORS(CLASS, CL_ABBR, OP_NAME, OP, CMP_OP)

Functions

template<typename T, typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
constexpr T pdfium::internal::NegateWrapper (T value)
template<typename T, typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
constexpr std::make_unsigned< T >::type pdfium::internal::InvertWrapper (T value)
template<typename T, typename std::enable_if< std::is_integral< T >::value >::type * = nullptr>
constexpr T pdfium::internal::AbsWrapper (T value)

Macro Definition Documentation

◆ BASE_HAS_OPTIMIZED_SAFE_MATH

#define BASE_HAS_OPTIMIZED_SAFE_MATH   (0)

Definition at line 33 of file safe_math_shared_impl.h.

◆ BASE_NUMERIC_ARITHMETIC_OPERATORS

#define BASE_NUMERIC_ARITHMETIC_OPERATORS ( CLASS,
CL_ABBR,
OP_NAME,
OP,
CMP_OP )
Value:
/* Binary arithmetic operator for all CLASS##Numeric operations. */ \
template <typename L, typename R, \
typename std::enable_if<Is##CLASS##Op<L, R>::value>::type* = \
nullptr> \
constexpr CLASS##Numeric< \
typename MathWrapper<CLASS##OP_NAME##Op, L, R>::type> \
operator OP(const L lhs, const R rhs) { \
return decltype(lhs OP rhs)::template MathOp<CLASS##OP_NAME##Op>(lhs, \
rhs); \
} \
/* Assignment arithmetic operator implementation from CLASS##Numeric. */ \
template <typename L> \
template <typename R> \
constexpr CLASS##Numeric<L>& CLASS##Numeric<L>::operator CMP_OP( \
const R rhs) { \
return MathOp<CLASS##OP_NAME##Op>(rhs); \
} \
/* Variadic arithmetic functions that return CLASS##Numeric. */ \
BASE_NUMERIC_ARITHMETIC_VARIADIC(CLASS, CL_ABBR, OP_NAME)
#define OP(a, b)
GLenum type

Definition at line 192 of file safe_math_shared_impl.h.

◆ BASE_NUMERIC_ARITHMETIC_VARIADIC

#define BASE_NUMERIC_ARITHMETIC_VARIADIC ( CLASS,
CL_ABBR,
OP_NAME )
Value:
template <typename L, typename R, typename... Args> \
constexpr auto CL_ABBR##OP_NAME(const L lhs, const R rhs, \
const Args... args) { \
return CL_ABBR##MathOp<CLASS##OP_NAME##Op, L, R, Args...>(lhs, rhs, \
args...); \
}
QJSValueList args

Definition at line 184 of file safe_math_shared_impl.h.