#include <cassert>
#include <climits>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <limits>
#include <type_traits>
#include "ax_build/build_config.h"
#include "base/numerics/safe_conversions.h"
Go to the source code of this file.
|
struct | base::internal::CheckedAddFastOp< T, U > |
|
struct | base::internal::CheckedSubFastOp< T, U > |
|
struct | base::internal::CheckedMulFastOp< T, U > |
|
struct | base::internal::ClampedAddFastOp< T, U > |
|
struct | base::internal::ClampedSubFastOp< T, U > |
|
struct | base::internal::ClampedMulFastOp< T, U > |
|
struct | base::internal::ClampedNegFastOp< T > |
|
struct | base::internal::UnsignedOrFloatForSize< Numeric, true, false > |
|
struct | base::internal::UnsignedOrFloatForSize< Numeric, false, true > |
|
struct | base::internal::MathWrapper< M, L, R > |
|
struct | base::internal::ResultType< M, L, R > |
|
struct | base::internal::ResultType< M, L, R, Args > |
|
◆ BASE_HAS_OPTIMIZED_SAFE_MATH
#define BASE_HAS_OPTIMIZED_SAFE_MATH (0) |
◆ BASE_NUMERIC_ARITHMETIC_OPERATORS
#define BASE_NUMERIC_ARITHMETIC_OPERATORS |
( |
|
CLASS, |
|
|
|
CL_ABBR, |
|
|
|
OP_NAME, |
|
|
|
OP, |
|
|
|
CMP_OP |
|
) |
| |
Value: \
template <
typename L,
typename R, \
nullptr> \
constexpr CLASS##Numeric< \
operator
OP(
const L lhs,
const R rhs) { \
return
decltype(lhs
OP rhs)::template MathOp<CLASS##OP_NAME##Op>(lhs, \
rhs); \
} \
\
template <typename L> \
template <typename R> \
constexpr CLASS##Numeric<L>& CLASS##Numeric<L>::operator CMP_OP( \
return MathOp<CLASS##OP_NAME##Op>(rhs); \
} \
\
BASE_NUMERIC_ARITHMETIC_VARIADIC(CLASS, CL_ABBR, OP_NAME)
Definition at line 216 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 CLASS##Numeric< \
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...); \
}
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
static CompileType * ResultType(Definition *call)
Definition at line 207 of file safe_math_shared_impl.h.