5#ifndef CORE_FXCRT_NUMERICS_SAFE_CONVERSIONS_IMPL_H_
6#define CORE_FXCRT_NUMERICS_SAFE_CONVERSIONS_IMPL_H_
13#if defined(__GNUC__
) || defined(__clang__
)
14#define BASE_NUMERICS_LIKELY(x) __builtin_expect(!!(x), 1
)
15#define BASE_NUMERICS_UNLIKELY(x) __builtin_expect(!!(x), 0
)
17#define BASE_NUMERICS_LIKELY(x) (x)
18#define BASE_NUMERICS_UNLIKELY(x) (x)
26template <
typename NumericType>
28 static const int value =
std::is_floating_point<NumericType>::value
29 ?
std::numeric_limits<NumericType>::max_exponent
30 :
std::numeric_limits<NumericType>::digits + 1;
35template <
typename NumericType>
37 static const int value =
std::numeric_limits<NumericType>::digits +
38 std::is_signed<NumericType>::value;
43template <
typename Integer>
51 typename std::enable_if<std::is_signed<T>::value>::type* =
nullptr>
53 static_assert(
std::is_arithmetic<T>::value,
"Argument must be numeric.");
58 typename std::enable_if<!std::is_signed<T>::value>::type* =
nullptr>
60 static_assert(
std::is_arithmetic<T>::value,
"Argument must be numeric.");
71 static_assert(
std::is_integral<T>::value,
"Type must be integral");
72 using SignedT =
typename std::make_signed<T>::type;
73 using UnsignedT =
typename std::make_unsigned<T>::type;
74 return static_cast<SignedT>((
static_cast<UnsignedT>(x) ^
75 static_cast<UnsignedT>(-SignedT(is_negative))) +
82 static_assert(
std::is_integral<T>::value,
"Type must be integral");
83 using UnsignedT =
typename std::make_unsigned<T>::type;
84 return IsValueNegative(value)
85 ?
static_cast<UnsignedT>(0u -
static_cast<UnsignedT>(value))
86 :
static_cast<UnsignedT>(value);
91#define IsConstantEvaluated() (__builtin_is_constant_evaluated())
106 template <
typename T>
110#elif defined(__GNUC__
) || defined(__clang__
)
113 ((
void)(*(
volatile char*)0 = 0));
137template <
typename Dst,
159template <
typename Dst,
typename Src>
171template <
typename Dst,
typename Src>
183 constexpr RangeCheck(
bool is_in_lower_bound,
bool is_in_upper_bound)
184 : is_underflow_(!is_in_lower_bound), is_overflow_(!is_in_upper_bound) {}
185 constexpr RangeCheck() : is_underflow_(
false), is_overflow_(
false) {}
186 constexpr bool IsValid()
const {
return !is_overflow_ && !is_underflow_; }
187 constexpr bool IsInvalid()
const {
return is_overflow_ && is_underflow_; }
188 constexpr bool IsOverflow()
const {
return is_overflow_ && !is_underflow_; }
189 constexpr bool IsUnderflow()
const {
return !is_overflow_ && is_underflow_; }
193 return is_underflow_ == rhs.is_underflow_ &&
194 is_overflow_ == rhs.is_overflow_;
197 return !(*
this == rhs);
203 const bool is_underflow_;
204 const bool is_overflow_;
228template <
typename Dst,
typename Src,
template <
typename>
class Bounds>
241 typename std::enable_if<std::is_integral<T>::value>::type* =
nullptr>
246 static_assert(
std::is_same<T, Dst>::value,
"");
248 using UnsignedDst =
typename std::make_unsigned_t<T>;
249 return static_cast<T>(ConditionalNegate(
250 SafeUnsignedAbs(value) & ~((UnsignedDst{1} << kShift) - UnsignedDst{1}),
251 IsValueNegative(value)));
254 template <
typename T,
255 typename std::enable_if<std::is_floating_point<T>::value>::type* =
258 static_assert(
std::is_same<T, Dst>::value,
"");
259 static_assert(
kShift == 0,
"");
263 static constexpr Dst
max() {
return Adjust(Bounds<Dst>::max()); }
264 static constexpr Dst
lowest() {
return Adjust(Bounds<Dst>::lowest()); }
267template <
typename Dst,
286template <
typename Dst,
311template <
typename Dst,
typename Src,
template <
typename>
class Bounds>
326template <
typename Dst,
typename Src,
template <
typename>
class Bounds>
342template <
typename Dst,
typename Src,
template <
typename>
class Bounds>
362template <
typename Dst,
typename Src,
template <
typename>
class Bounds>
392template <
typename Dst,
typename Src>
398template <
typename Dst,
399 template <
typename>
class Bounds =
std::numeric_limits,
402 static_assert(
std::is_arithmetic<Src>::value,
"Argument must be numeric.");
403 static_assert(
std::is_arithmetic<Dst>::value,
"Result must be numeric.");
404 static_assert(Bounds<Dst>::lowest() < Bounds<Dst>::max(),
"");
405 return DstRangeRelationToSrcRangeImpl<Dst, Src, Bounds>::Check(value);
409template <size_t Size,
bool IsSigned>
412#define INTEGER_FOR_DIGITS_AND_SIGN(I)
414 struct IntegerForDigitsAndSign<IntegerBitsPlusSign<I>::value,
415 std::is_signed<I>::value> {
427#undef INTEGER_FOR_DIGITS_AND_SIGN
433 "Max integer size not supported for this toolchain.");
435template <
typename Integer,
bool IsSigned =
std::is_signed<Integer>::value>
448template <
typename Lhs,
456template <
typename Lhs,
typename Rhs>
461template <
typename Lhs,
typename Rhs>
467template <
typename Lhs,
470 std::is_signed<Lhs>::value
471 ? (
std::is_signed<Rhs>::value
476 : (
std::is_signed<Rhs>::value
483template <
typename Lhs,
typename Rhs>
488template <
typename Lhs,
typename Rhs>
497 bool is_intmax_type =
501 bool is_max_exponent =
511template <
typename Lhs,
typename Rhs,
bool is_intmax_type>
518template <
typename Lhs,
typename Rhs>
528template <
typename Lhs,
typename Rhs>
538template <
typename T,
typename Lhs,
typename Rhs = Lhs>
541 !
std::is_floating_point<T>::value &&
542 !
std::is_floating_point<Lhs>::value &&
543 !
std::is_floating_point<Rhs>::value &&
544 std::is_signed<T>::value >=
std::is_signed<Lhs>::value &&
546 std::is_signed<T>::value >=
std::is_signed<Rhs>::value &&
552template <
typename Lhs,
562template <
typename Lhs,
typename Rhs>
572template <
typename Lhs,
typename Rhs>
579template <
typename T,
bool is_enum =
std::is_enum<T>::value>
641template <
typename L,
typename R>
648template <
typename L,
typename R>
656template <
typename L,
typename R>
668template <
typename Src>
669constexpr typename std::make_signed<
672 static_assert(
std::is_integral<
decltype(as_signed(value))>::value,
673 "Argument must be a signed or unsigned integer type.");
674 return static_cast<
decltype(as_signed(value))>(value);
680template <
typename Src>
681constexpr typename std::make_unsigned<
684 static_assert(
std::is_integral<
decltype(as_unsigned(value))>::value,
685 "Argument must be a signed or unsigned integer type.");
686 return static_cast<
decltype(as_unsigned(value))>(value);
689template <
typename L,
typename R>
695 (l_range
== r_range &&
static_cast<
decltype(lhs + rhs)>(lhs) <
696 static_cast<
decltype(lhs + rhs)>(rhs));
699template <
typename L,
typename R>
701 static_assert(
std::is_arithmetic<L>::value &&
std::is_arithmetic<R>::value,
702 "Types must be numeric.");
703 static constexpr bool Test(
const L lhs,
const R rhs) {
704 return IsLessImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
705 DstRangeRelationToSrcRange<L>(rhs));
709template <
typename L,
typename R>
715 (l_range
== r_range &&
static_cast<
decltype(lhs + rhs)>(lhs) <=
716 static_cast<
decltype(lhs + rhs)>(rhs));
719template <
typename L,
typename R>
721 static_assert(
std::is_arithmetic<L>::value &&
std::is_arithmetic<R>::value,
722 "Types must be numeric.");
723 static constexpr bool Test(
const L lhs,
const R rhs) {
724 return IsLessOrEqualImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
725 DstRangeRelationToSrcRange<L>(rhs));
729template <
typename L,
typename R>
735 (l_range
== r_range &&
static_cast<
decltype(lhs + rhs)>(lhs) >
736 static_cast<
decltype(lhs + rhs)>(rhs));
739template <
typename L,
typename R>
741 static_assert(
std::is_arithmetic<L>::value &&
std::is_arithmetic<R>::value,
742 "Types must be numeric.");
743 static constexpr bool Test(
const L lhs,
const R rhs) {
744 return IsGreaterImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
745 DstRangeRelationToSrcRange<L>(rhs));
749template <
typename L,
typename R>
755 (l_range
== r_range &&
static_cast<
decltype(lhs + rhs)>(lhs) >=
756 static_cast<
decltype(lhs + rhs)>(rhs));
759template <
typename L,
typename R>
761 static_assert(
std::is_arithmetic<L>::value &&
std::is_arithmetic<R>::value,
762 "Types must be numeric.");
763 static constexpr bool Test(
const L lhs,
const R rhs) {
764 return IsGreaterOrEqualImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
765 DstRangeRelationToSrcRange<L>(rhs));
769template <
typename L,
typename R>
771 static_assert(
std::is_arithmetic<L>::value &&
std::is_arithmetic<R>::value,
772 "Types must be numeric.");
773 static constexpr bool Test(
const L lhs,
const R rhs) {
774 return DstRangeRelationToSrcRange<R>(lhs) ==
775 DstRangeRelationToSrcRange<L>(rhs) &&
776 static_cast<
decltype(lhs + rhs)>(lhs) ==
777 static_cast<
decltype(lhs + rhs)>(rhs);
781template <
typename L,
typename R>
783 static_assert(
std::is_arithmetic<L>::value &&
std::is_arithmetic<R>::value,
784 "Types must be numeric.");
785 static constexpr bool Test(
const L lhs,
const R rhs) {
786 return DstRangeRelationToSrcRange<R>(lhs) !=
787 DstRangeRelationToSrcRange<L>(rhs) ||
788 static_cast<
decltype(lhs + rhs)>(lhs) !=
789 static_cast<
decltype(lhs + rhs)>(rhs);
795template <
template <
typename,
typename>
class C,
typename L,
typename R>
797 static_assert(
std::is_arithmetic<L>::value &&
std::is_arithmetic<R>::value,
798 "Types must be numeric.");
799 using Promotion = BigEnoughPromotion<L, R>;
800 using BigType =
typename Promotion::type;
801 return Promotion::is_contained
803 ? C<BigType, BigType>::Test(
804 static_cast<BigType>(
static_cast<L>(lhs)),
805 static_cast<BigType>(
static_cast<R>(rhs)))
807 : C<L, R>::Test(lhs, rhs);
810template <
typename Dst,
typename Src>
813 std::numeric_limits<Src>::max());
816template <
typename Dst,
typename Src>
819 std::numeric_limits<Src>::lowest());
822template <
typename Dst,
typename Src>
824 return !IsMaxInRangeForNumericType<Dst, Src>()
825 ? Dst(
std::numeric_limits<Dst>::max())
826 : Dst(
std::numeric_limits<Src>::max());
829template <
typename Dst,
typename Src>
831 return !IsMinInRangeForNumericType<Dst, Src>()
832 ? Dst(
std::numeric_limits<Dst>::lowest())
833 : Dst(
std::numeric_limits<Src>::lowest());
839template <
typename Dst,
typename Src = Dst>
841 return is_min ? CommonMin<Dst, Src>() : CommonMax<Dst, Src>();
#define FXCRT_BYTESWAPS_CONSTEXPR
constexpr bool operator==(const RangeCheck rhs) const
constexpr bool IsValid() const
constexpr bool IsOverflowFlagSet() const
constexpr bool IsUnderflow() const
constexpr bool operator!=(const RangeCheck rhs) const
constexpr bool IsUnderflowFlagSet() const
constexpr RangeCheck(bool is_in_lower_bound, bool is_in_upper_bound)
constexpr bool IsOverflow() const
constexpr bool IsInvalid() const
constexpr StrictNumeric(Src value)
constexpr StrictNumeric()
constexpr StrictNumeric(T value)
constexpr operator Dst() const
constexpr StrictNumeric(const StrictNumeric< Src > &rhs)
constexpr span(T(&array)[N]) noexcept
constexpr reverse_iterator rend() const noexcept
constexpr reverse_iterator rbegin() const noexcept
constexpr const_reverse_iterator crend() const noexcept
std::reverse_iterator< iterator > reverse_iterator
const span first(size_t count) const
typename std::remove_cv< T >::type value_type
span & operator=(const span &other) noexcept
constexpr const_iterator cbegin() const noexcept
constexpr const_iterator cend() const noexcept
constexpr const_reverse_iterator crbegin() const noexcept
const span last(size_t count) const
constexpr bool empty() const noexcept
constexpr size_t size() const noexcept
constexpr span(Container &container)
friend constexpr span< U > make_span(U *data, size_t size) noexcept
std::reverse_iterator< const_iterator > const_reverse_iterator
const span subspan(size_t pos, size_t count=dynamic_extent) const
constexpr iterator begin() const noexcept
constexpr size_t size_bytes() const noexcept
constexpr span() noexcept=default
span(const Container &container)
constexpr span(std::array< T, N > &array) noexcept
constexpr T & back() const noexcept
constexpr span(const std::array< std::remove_cv_t< T >, N > &array) noexcept
constexpr T * data() const noexcept
constexpr T & front() const noexcept
constexpr span(const span &other) noexcept=default
UNSAFE_BUFFER_USAGE constexpr span(T *data, size_t size) noexcept
constexpr span(const span< U, M, R > &other)
T & operator[](size_t index) const noexcept
constexpr iterator end() const noexcept
#define UNSAFE_BUFFERS(...)
#define UNSAFE_BUFFER_USAGE
void CRYPT_MD5Finish(CRYPT_md5_context *context, pdfium::span< uint8_t, 16 > digest)
#define P(a, b, c, d, k, s, t)
void CRYPT_MD5Generate(pdfium::span< const uint8_t > data, pdfium::span< uint8_t, 16 > digest)
void CRYPT_ArcFourCryptBlock(pdfium::span< uint8_t > data, pdfium::span< const uint8_t > key)
void CRYPT_ArcFourSetup(CRYPT_rc4_context *context, pdfium::span< const uint8_t > key)
void CRYPT_MD5Update(CRYPT_md5_context *context, pdfium::span< const uint8_t > data)
void CRYPT_ArcFourCrypt(CRYPT_rc4_context *context, pdfium::span< uint8_t > data)
CRYPT_md5_context CRYPT_MD5Start()
void CRYPT_AESEncrypt(CRYPT_aes_context *ctx, pdfium::span< uint8_t > dest, pdfium::span< const uint8_t > src)
void CRYPT_AESSetIV(CRYPT_aes_context *ctx, const uint8_t *iv)
void CRYPT_AESDecrypt(CRYPT_aes_context *ctx, uint8_t *dest, const uint8_t *src, uint32_t size)
void CRYPT_AESSetKey(CRYPT_aes_context *ctx, const uint8_t *key, uint32_t keylen)
void CRYPT_SHA512Update(CRYPT_sha2_context *context, pdfium::span< const uint8_t > data)
void CRYPT_SHA384Update(CRYPT_sha2_context *context, pdfium::span< const uint8_t > data)
DataVector< uint8_t > CRYPT_SHA256Generate(pdfium::span< const uint8_t > data)
void CRYPT_SHA1Finish(CRYPT_sha1_context *context, pdfium::span< uint8_t, 20 > digest)
void CRYPT_SHA1Update(CRYPT_sha1_context *context, pdfium::span< const uint8_t > data)
void CRYPT_SHA512Finish(CRYPT_sha2_context *context, pdfium::span< uint8_t, 64 > digest)
DataVector< uint8_t > CRYPT_SHA384Generate(pdfium::span< const uint8_t > data)
void CRYPT_SHA384Start(CRYPT_sha2_context *context)
void CRYPT_SHA384Finish(CRYPT_sha2_context *context, pdfium::span< uint8_t, 48 > digest)
void CRYPT_SHA512Start(CRYPT_sha2_context *context)
DataVector< uint8_t > CRYPT_SHA1Generate(pdfium::span< const uint8_t > data)
void CRYPT_SHA256Start(CRYPT_sha2_context *context)
DataVector< uint8_t > CRYPT_SHA512Generate(pdfium::span< const uint8_t > data)
void CRYPT_SHA1Start(CRYPT_sha1_context *context)
void CRYPT_SHA256Finish(CRYPT_sha2_context *context, pdfium::span< uint8_t, 32 > digest)
void CRYPT_SHA256Update(CRYPT_sha2_context *context, pdfium::span< const uint8_t > data)
NOINLINE void FX_OutOfMemoryTerminate(size_t size)
void * FX_AlignedAlloc(size_t size, size_t alignment)
void FXMEM_DefaultFree(void *pointer)
void * FXMEM_DefaultAlloc(size_t byte_size)
void * FXMEM_DefaultCalloc(size_t num_elems, size_t byte_size)
void * FXMEM_DefaultRealloc(void *pointer, size_t new_size)
void * FX_ArrayBufferAllocate(size_t length)
void FX_DestroyMemoryAllocators()
void FX_InitializeMemoryAllocators()
void FX_ArrayBufferFree(void *data)
void * FX_ArrayBufferAllocateUninitialized(size_t length)
FXCRT_BYTESWAPS_CONSTEXPR uint16_t ByteSwap(uint16_t x)
FXCRT_BYTESWAPS_CONSTEXPR uint32_t ByteSwap(uint32_t x)
uint32_t FromBE32(uint32_t x)
constexpr std::array< U, N > ToArrayImpl(const T(&data)[N], std::index_sequence< I... >)
uint16_t GetUInt16LSBFirst(pdfium::span< const uint8_t, 2 > span)
void PutUInt32MSBFirst(uint32_t value, pdfium::span< uint8_t, 4 > span)
ResultType CollectionSize(const Collection &collection)
FakeUniquePtr< T > MakeFakeUniquePtr(T *arg)
void PutUInt16LSBFirst(uint16_t value, pdfium::span< uint8_t, 2 > span)
uint16_t FromBE16(uint16_t x)
void PutUInt32LSBFirst(uint32_t value, pdfium::span< uint8_t, 4 > span)
uint16_t GetUInt16MSBFirst(pdfium::span< const uint8_t, 2 > span)
constexpr std::array< U, N > ToArray(const U(&data)[N])
uint32_t GetUInt32MSBFirst(pdfium::span< const uint8_t, 4 > span)
bool IndexInBounds(const Collection &collection, IndexType index)
void PutUInt16MSBFirst(uint16_t value, pdfium::span< uint8_t, 2 > span)
void Copy(const T &source_container, U &&dest_container)
void Fill(T &&container, const V &value)
uint32_t FromLE32(uint32_t x)
uint32_t GetUInt32LSBFirst(pdfium::span< const uint8_t, 4 > span)
uint16_t FromLE16(uint16_t x)
void * CallocOrDie2D(size_t w, size_t h, size_t member_size)
@ INTEGER_REPRESENTATION_SIGNED
@ INTEGER_REPRESENTATION_UNSIGNED
void * AllocOrDie2D(size_t w, size_t h, size_t member_size)
constexpr Dst saturated_cast(Src value)
constexpr bool kEnableAsmCode
std::is_integral< decltype(std::declval< Container >().size())> ContainerHasIntegralSize
void * StringAllocOrDie(size_t num_members, size_t member_size)
constexpr std::make_signed< typenameinternal::UnderlyingType< Src >::type >::type as_signed(const Src value)
constexpr bool IsMinInRangeForNumericType()
constexpr Dst CommonMax()
void * Alloc(size_t num_members, size_t member_size)
IsSpanImpl< typename std::decay< T >::type > IsSpan
constexpr bool IsMaxInRangeForNumericType()
void * StringAlloc(size_t num_members, size_t member_size)
void * ReallocOrDie(void *ptr, size_t num_members, size_t member_size)
std::is_convertible< From *, To * > IsLegalSpanConversion
constexpr bool IsValueNegative(T value)
constexpr bool SafeCompare(const L lhs, const R rhs)
void * Realloc(void *ptr, size_t num_members, size_t member_size)
NumericRangeRepresentation
@ NUMERIC_RANGE_CONTAINED
@ NUMERIC_RANGE_NOT_CONTAINED
IsStdArrayImpl< typename std::decay< T >::type > IsStdArray
void StringDealloc(void *ptr)
constexpr bool IsGreaterImpl(const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)
constexpr Dst CommonMin()
constexpr bool IsValueInRangeForNumericType(Src value)
constexpr Dst CommonMaxOrMin(bool is_min)
void * AllocOrDie(size_t num_members, size_t member_size)
constexpr RangeCheck DstRangeRelationToSrcRange(Src value)
constexpr Dst checked_cast(Src value)
void * Alloc2D(size_t w, size_t h, size_t member_size)
constexpr std::make_unsigned< T >::type SafeUnsignedAbs(T value)
void * Calloc(size_t num_members, size_t member_size)
constexpr Dst strict_cast(Src value)
constexpr bool IsLessOrEqualImpl(const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)
constexpr StrictNumeric< typename UnderlyingType< T >::type > MakeStrictNum(const T value)
constexpr std::make_unsigned< typenameinternal::UnderlyingType< Src >::type >::type as_unsigned(const Src value)
constexpr std::make_signed< T >::type ConditionalNegate(T x, bool is_negative)
void * CallocOrDie(size_t num_members, size_t member_size)
constexpr bool IsGreaterOrEqualImpl(const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)
ArithmeticPromotionCategory
constexpr bool IsLessImpl(const L lhs, const R rhs, const RangeCheck l_range, const RangeCheck r_range)
constexpr Dst saturated_cast_impl(Src value, RangeCheck constraint)
constexpr span< T > make_span(T(&array)[N]) noexcept
span< char > as_writable_chars(span< T, N, P > s) noexcept
span< const uint8_t > as_bytes(span< T, N, P > s) noexcept
constexpr size_t dynamic_extent
static constexpr span< T > span_from_ref(T &single_object) noexcept
static constexpr span< const uint8_t > byte_span_from_ref(const T &single_object) noexcept
Dst ClampRound(Src value)
UNSAFE_BUFFER_USAGE constexpr span< T > make_span(T *data, size_t size) noexcept
span< const uint8_t > as_byte_span(T &&arg)
span< const char > as_chars(span< T, N, P > s) noexcept
span< const uint8_t > as_byte_span(const T &arg)
UNOWNED_PTR_EXCLUSION T * DefaultSpanInternalPtr
span< uint8_t > as_writable_bytes(span< T, N, P > s) noexcept
constexpr span< T > make_span(std::array< T, N > &array) noexcept
constexpr span< T > make_span(Container &container)
constexpr span< uint8_t > as_writable_byte_span(T &&arg)
IMMEDIATE_CRASH_ALWAYS_INLINE void ImmediateCrash()
static constexpr span< uint8_t > byte_span_from_ref(T &single_object) noexcept
Dst ClampFloor(Src value)
constexpr span< T > make_span(const Container &container)
#define __has_attribute(x)
#define BASE_HAS_OPTIMIZED_SAFE_CONVERSIONS
#define BASE_NUMERIC_COMPARISON_OPERATORS(CLASS, NAME, OP)
#define INTEGER_FOR_DIGITS_AND_SIGN(I)
#define BASE_NUMERICS_LIKELY(x)
#define IsConstantEvaluated()
std::array< uint32_t, kMaxNb > iv
std::array< uint32_t, kSchedSize > invkeysched
static constexpr int kMaxNr
static constexpr int kSchedSize
static constexpr int kMaxNb
std::array< uint32_t, kSchedSize > keysched
std::array< uint32_t, 4 > state
std::array< uint32_t, 2 > total
std::array< int32_t, kPermutationLength > m
static constexpr int32_t kPermutationLength
std::array< uint32_t, 5 > h
std::array< uint8_t, 64 > block
std::array< uint64_t, 8 > state
void operator()(void *ptr) const
FxPartitionAllocAllocator< U, Alloc, Free > other
pointer allocate(size_type n, const void *hint=0)
void deallocate(pointer p, size_type n)
const_pointer address(const_reference x) const noexcept
FxPartitionAllocAllocator() noexcept=default
size_type max_size() const noexcept
~FxPartitionAllocAllocator()=default
pointer address(reference x) const noexcept
FxPartitionAllocAllocator(const FxPartitionAllocAllocator< U, Alloc, Free > &other) noexcept
bool operator!=(const FxPartitionAllocAllocator &that)
void construct(U *p, Args &&... args)
const T & const_reference
bool operator==(const FxPartitionAllocAllocator &that)
FxPartitionAllocAllocator(const FxPartitionAllocAllocator &other) noexcept=default
typename std::underlying_type< T >::type type
static constexpr bool Test(const L lhs, const R rhs)
static constexpr bool Test(const L lhs, const R rhs)
static constexpr bool Test(const L lhs, const R rhs)
static constexpr bool Test(const L lhs, const R rhs)
static constexpr bool Test(const L lhs, const R rhs)
static constexpr bool Test(const L lhs, const R rhs)
static constexpr bool value
static constexpr bool is_supported
static constexpr bool Do(Src value)
static constexpr T Adjust(T value)
std::numeric_limits< Src > SrcLimits
static constexpr Dst max()
typename std::numeric_limits< Dst > DstLimits
static constexpr Dst lowest()
static const size_t value
static constexpr Dst Do(Src)
static constexpr bool is_supported
static constexpr bool is_supported
static constexpr Dst Do(Src value)
static constexpr T Overflow()
static constexpr T Underflow()
static const NumericRangeRepresentation value
static const NumericRangeRepresentation value
static const NumericRangeRepresentation value
typename IntegerForDigitsAndSign< IntegerBitsPlusSign< Integer >::value *2, IsSigned >::type type
static const bool is_strict
static const bool is_clamped
static const bool is_numeric
static const bool is_checked
static const bool is_clamped
static const bool is_numeric
static const bool is_checked
static const bool is_strict
static const bool is_clamped
static const bool is_checked
static const bool is_numeric
static const bool is_strict
static const bool is_strict
static const bool is_clamped
static const bool is_checked
static const bool is_numeric
#define UNOWNED_PTR_EXCLUSION