9#pragma qt_class(QtAlgorithms)
12#include <QtCore/qglobal.h>
13#include <QtCore/q20bit.h>
14#include <QtCore/q20functional.h>
17#define QT_HAS_CONSTEXPR_BITOPS
21template <
typename ForwardIterator>
22Q_OUTOFLINE_TEMPLATE
void qDeleteAll(ForwardIterator begin, ForwardIterator end)
24 while (begin != end) {
30template <
typename Container>
33 qDeleteAll(c.begin(), c.end());
37Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint32 v)
noexcept
39 return q20::popcount(v);
42Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint8 v)
noexcept
44 return q20::popcount(v);
47Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint16 v)
noexcept
49 return q20::popcount(v);
52Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(quint64 v)
noexcept
54 return q20::popcount(v);
57Q_DECL_CONST_FUNCTION
constexpr inline uint qPopulationCount(
long unsigned int v)
noexcept
59 return q20::popcount(v);
64 return q20::countr_zero(v);
69 return q20::countr_zero(v);
74 return q20::countr_zero(v);
79 return q20::countr_zero(v);
84 return q20::countr_zero(v);
89 return q20::countl_zero(v);
94 return q20::countl_zero(v);
99 return q20::countl_zero(v);
104 return q20::countl_zero(v);
109 return q20::countl_zero(v);
112template <
typename InputIterator,
typename Result,
typename Separator = Result,
114Result
qJoin(InputIterator first, InputIterator last, Result init,
const Separator &separator = {},
118 init += std::invoke(p, *first);
122 while (first != last) {
124 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)
Combined button and popup list for selecting options.
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)