8#pragma qt_class(QtAlgorithms)
11#include <QtCore/qglobal.h>
12#include <QtCore/q20bit.h>
13#include <QtCore/q20functional.h>
16#define QT_HAS_CONSTEXPR_BITOPS
20template <
typename ForwardIterator>
21Q_OUTOFLINE_TEMPLATE
void qDeleteAll(ForwardIterator begin, ForwardIterator end)
23 while (begin != end) {
29template <
typename Container>
32 qDeleteAll(c.begin(), c.end());
36Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint32 v)
noexcept
38 return q20::popcount(v);
41Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint8 v)
noexcept
43 return q20::popcount(v);
46Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint16 v)
noexcept
48 return q20::popcount(v);
51Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint64 v)
noexcept
53 return q20::popcount(v);
56Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(
long unsigned int v)
noexcept
58 return q20::popcount(v);
63 return q20::countr_zero(v);
68 return q20::countr_zero(v);
73 return q20::countr_zero(v);
78 return q20::countr_zero(v);
83 return q20::countr_zero(v);
88 return q20::countl_zero(v);
93 return q20::countl_zero(v);
98 return q20::countl_zero(v);
103 return q20::countl_zero(v);
108 return q20::countl_zero(v);
111template <
typename InputIterator,
typename Result,
typename Separator = Result,
113Result
qJoin(InputIterator first, InputIterator last, Result init,
const Separator &separator = {},
117 init += std::invoke(p, *first);
121 while (first != last) {
123 init += std::invoke(p, *first);
static constexpr T fromSpecial(T source)
static constexpr T toSpecial(T source)
static constexpr T fromSpecial(T source)
static constexpr T toSpecial(T source)
bool operator!=(QSpecialInteger< S > i) const
static constexpr QSpecialInteger max()
QSpecialInteger & operator>>=(T i)
constexpr QSpecialInteger(T i)
QSpecialInteger & operator++()
bool operator==(QSpecialInteger< S > i) const
QSpecialInteger & operator=(T i)
QSpecialInteger operator++(int)
QSpecialInteger & operator&=(T i)
QSpecialInteger & operator+=(T i)
QSpecialInteger & operator|=(T i)
QSpecialInteger & operator--()
QSpecialInteger & operator*=(T i)
QSpecialInteger operator--(int)
QSpecialInteger & operator^=(T i)
QSpecialInteger()=default
QSpecialInteger & operator%=(T i)
QSpecialInteger & operator/=(T i)
static constexpr QSpecialInteger min()
QSpecialInteger & operator-=(T i)
constexpr uint qCountLeadingZeroBits(unsigned long v) noexcept
void qDeleteAll(const Container &c)
constexpr uint qCountTrailingZeroBits(quint32 v) noexcept
constexpr uint qCountTrailingZeroBits(unsigned long v) noexcept
constexpr uint qCountLeadingZeroBits(quint32 v) noexcept
Result qJoin(InputIterator first, InputIterator last, Result init, const Separator &separator={}, Projection p={})
static Q_ALWAYS_INLINE void * bswapLoop(const uchar *src, size_t n, uchar *dst) noexcept
void * qbswap< 2 >(const void *source, qsizetype n, void *dest) noexcept
QBEInteger< quint64 > quint64_be
float qbswap(float source)
void qToLittleEndian(T src, void *dest)
void qToLittleEndian(const void *source, qsizetype count, void *dest)
QLEInteger< qint64 > qint64_le
void qToBigEndian(T src, void *dest)
QBEInteger< qint32 > qint32_be
QLEInteger< qint32 > qint32_le
void qFromLittleEndian(const void *source, qsizetype count, void *dest)
void qbswap(const T src, void *dest)
QSpecialInteger< QLittleEndianStorageType< T > > QLEInteger
Constructs a QLEInteger with the given value.
QBEInteger< qint64 > qint64_be
QLEInteger< quint32 > quint32_le
QLEInteger< quint64 > quint64_le
QSpecialInteger< QBigEndianStorageType< T > > QBEInteger
Constructs a QBEInteger with the given value.
constexpr quint64 qbswap_helper(quint64 source)
qfloat16 qbswap(qfloat16 source)
void * qbswap(const void *source, qsizetype count, void *dest) noexcept
QBEInteger< quint32 > quint32_be
constexpr T qFromLittleEndian(T source)
constexpr T qToBigEndian(T source)
QLEInteger< quint16 > quint16_le
T qFromLittleEndian(const void *src)
QLEInteger< qint16 > qint16_le
constexpr T qFromBigEndian(T source)
QBEInteger< qint16 > qint16_be
void qToBigEndian(const void *source, qsizetype count, void *dest)
QBEInteger< quint16 > quint16_be
T qFromBigEndian(const void *src)
double qbswap(double source)
void qFromBigEndian(const void *source, qsizetype count, void *dest)
constexpr T qToLittleEndian(T source)
Float qbswapFloatHelper(Float source)