summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcontainertools_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* doc: Remove ifndef Q_QDOCMartin Smith2019-09-161-4/+0
| | | | | | | qdoc needs to see these declarations now because... clang. Change-Id: I93264125db5bcea6adb1a4636e5459ec80702de1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QHash/QMultiHash: add range constructorsMarc Mutz2019-04-251-0/+43
| | | | | | | | | | | | | | QMap and QMultiMap will go in a separate commit, due to QMap's insertion behavior that "reverses" the inserted elements. [ChangeLog][QtCore][QHash] Added range constructor. [ChangeLog][QtCore][QMultiHash] Added range constructor. Change-Id: Icfd0d0afde27792e8439ed6df3e8774696b134d3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Non-associative containers: add range constructorsMarc Mutz2019-04-171-0/+93
Something nice we'd like to detect for array-backed containers is if the iterator passed is a Contiguous one; if the type is also trivially copyable / Q_PRIMITIVE_TYPE, we could memcpy() the whole range. However, there's no trait in the Standard to detect contiguous iterators (the best approximation would be detecting if the iterator is actually a pointer). Also, it's probably not smart to do the work now for QVector since QVector needs refactoring anyhow, and this work will be lost. QString and QByteArray are left in another commit. [ChangeLog][QtCore][QVector] Added range constructor. [ChangeLog][QtCore][QVarLengthArray] Added range constructor. [ChangeLog][QtCore][QList] Added range constructor. [ChangeLog][QtCore][QStringList] Added range constructor. [ChangeLog][QtCore][QLinkedList] Added range constructor. [ChangeLog][QtCore][QSet] Added range constructor. Change-Id: I220edb796053c9c4d31a6dbdc7efc5fc0f6678f9 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>