Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
q20map.h File Reference

(1a7edf3ba7bc8f7cdcd11eae973582158b4ecff8)

#include <QtCore/qtconfigmacros.h>
#include <map>
+ Include dependency graph for q20map.h:

Go to the source code of this file.

Namespaces

namespace  q20
 

Macros

#define MAKE_OVERLOAD(map, allocator)
 

Macro Definition Documentation

◆ MAKE_OVERLOAD

#define MAKE_OVERLOAD ( map,
allocator )
Value:
template <typename Key, typename T, typename Compare, typename Pred> \
constexpr typename std::map<Key, T, Compare, std::allocator<std::pair<const Key, T>>>::size_type \
erase_if(std::map<Key, T, Compare, std::allocator<std::pair<const Key, T>>> &c, Pred p) \
{ \
const auto origSize = c.size(); \
for (auto it = c.begin(), end = c.end(); it != end; /* erasing */) { \
if (p(*it)) \
it = c.erase(it); \
else \
++it; \
} \
return origSize - c.size(); \
} \
/* end */
qsizetype size() const
Definition qset.h:50
iterator begin()
Definition qset.h:136
iterator erase(const_iterator i)
Definition qset.h:145
QSet< QString >::iterator it
GLuint GLuint end
const GLubyte * c
GLfloat GLfloat p
[1]

Definition at line 42 of file q20map.h.