4#ifndef QMINIMALFLATSET_P_H
5#define QMINIMALFLATSET_P_H
18#include <QtQuick/qtquickglobal.h>
20#include <QtCore/qcontainerfwd.h>
21#include <QtCore/private/qglobal_p.h>
24#ifdef QMINIMAL_FLAT_SET_DEBUG
25# include <QtCore/qscopeguard.h>
26# include <QtCore/qdebug.h>
27# define QMINIMAL_FLAT_SET_PRINT_AT_END \
28 const auto sg = qScopeGuard([&] { qDebug() << this << *this; });
30# define QMINIMAL_FLAT_SET_PRINT_AT_END
47template <
typename T,
typename Container = QList<T>>
76 auto size()
const {
return c.size(); }
83 const auto r = lookup(
v);
87 return {
c.insert(
r.it, std::move(
v)),
true};
93 const auto r = lookup(
v);
97 return {
c.insert(
r.it,
v),
true};
103 const auto r = lookup(
v);
111 return lookup(
v).exists;
114 const Container &
values() const & {
return c; }
115 Container
values() && {
return std::move(
c); }
125 const auto it = std::lower_bound(
c.cbegin(),
c.cend(),
v);
129#ifdef QMINIMAL_FLAT_SET_DEBUG
133 dbg.nospace() <<
"QMinimalFlatSet{";
typename Container::const_reverse_iterator const_reverse_iterator
std::pair< iterator, bool > insert(const value_type &v)
const Container & values() const &
bool contains(const value_type &v) const
reverse_iterator crbegin() const
typename Container::const_iterator const_iterator
void erase(const value_type &v)
reverse_iterator rbegin() const
void remove(const value_type &v)
std::pair< iterator, bool > insert(value_type &&v)
const_reverse_iterator reverse_iterator
reverse_iterator rend() const
reverse_iterator crend() const
const_iterator cend() const noexcept
QSet< QString >::iterator it
Combined button and popup list for selecting options.
#define QMINIMAL_FLAT_SET_PRINT_AT_END
GLsizei const GLfloat * v
[13]
QFuture< QSet< QChar > > set
[10]