8#include <QtCore/qpair.h>
9#include <QtCore/qatomic.h>
10#include <QtCore/qflags.h>
11#include <QtCore/qcontainerfwd.h>
16#if __has_cpp_attribute(gnu::malloc)
17# define Q_DECL_MALLOCLIKE [[nodiscard, gnu::malloc]]
19# define Q_DECL_MALLOCLIKE [[nodiscard]]
109#if defined(Q_PROCESSOR_X86_32) && defined(Q_CC_GNU)
134 if constexpr (
sizeof(T) == 1) {
137 }
else if constexpr (
sizeof(T) == 2) {
143#if __has_builtin(__builtin_assume_aligned)
150 static std::pair<QTypedArrayData *, T *>
154 std::pair<QArrayData *, void *> pair =
156 return {
static_cast<QTypedArrayData *
>(pair.first),
static_cast<T *
>(pair.second)};
169 void *
start =
reinterpret_cast<void *
>(
171 return static_cast<T *
>(
start);
196 if (length < 0 || length + position >= originalLength) {
219#undef Q_DECL_MALLOCLIKE
T loadRelaxed() const noexcept
Combined button and popup list for selecting options.
constexpr qsizetype MaxAllocSize
constexpr size_t MaxPrimitiveAlignment
#define Q_DECL_MALLOCLIKE
static QString header(const QString &name)
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
qsizetype detachCapacity(qsizetype newSize) const noexcept
@ CapacityReserved
the capacity was reserved by the user, try to keep it
bool deref() noexcept
Returns false if deallocation is necessary.
static Q_CORE_EXPORT std::pair< QArrayData *, void * > reallocateUnaligned(QArrayData *data, void *dataPointer, qsizetype objectSize, qsizetype newCapacity, AllocationOption option) noexcept
bool isShared() const noexcept
qsizetype constAllocatedCapacity() const noexcept
static Q_DECL_MALLOCLIKE Q_CORE_EXPORT void * allocate(QArrayData **pdata, qsizetype objectSize, qsizetype alignment, qsizetype capacity, AllocationOption option=QArrayData::KeepSize) noexcept
static Q_CORE_EXPORT void deallocate(QArrayData *data, qsizetype objectSize, qsizetype alignment) noexcept
bool needsDetach() noexcept
static Q_DECL_MALLOCLIKE Q_CORE_EXPORT void * allocate2(QArrayData **pdata, qsizetype capacity, AllocationOption option=QArrayData::KeepSize) noexcept
qsizetype allocatedCapacity() noexcept
bool ref() noexcept
Returns true if sharing took place.
static Q_DECL_MALLOCLIKE Q_CORE_EXPORT void * allocate1(QArrayData **pdata, qsizetype capacity, AllocationOption option=QArrayData::KeepSize) noexcept
static std::pair< QTypedArrayData *, T * > reallocateUnaligned(QTypedArrayData *data, T *dataPointer, qsizetype capacity, AllocationOption option)
static std::pair< QTypedArrayData *, T * > allocate(qsizetype capacity, AllocationOption option=QArrayData::KeepSize)
static constexpr qsizetype max_size() noexcept
static void deallocate(QArrayData *data) noexcept
static T * dataStart(QArrayData *data, qsizetype alignment) noexcept
static constexpr CutResult mid(qsizetype originalLength, qsizetype *_position, qsizetype *_length)