diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-01-09 10:15:21 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-12 02:03:15 +0100 |
commit | d4611ba3a5b46ee790e6c790ef6c3d771d3507ee (patch) | |
tree | 75e44c60ec95cbeef0ff7c069b3c9f6a38b4a20c /src/corelib/tools/qflatmap_p.h | |
parent | 234e0eadc83a4de6e48bce884542773fc1396e51 (diff) |
QFlatMap: add an alias for using QVarLengthArrays
... in an attempt to foster the use of this data structure by making
it less onerous to spell.
Pick-to: 6.3 6.2
Change-Id: Ib9d17029c75278edde6ba90f65f68af179a6d230
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools/qflatmap_p.h')
-rw-r--r-- | src/corelib/tools/qflatmap_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h index d7f8ff48cb..3b847fc63a 100644 --- a/src/corelib/tools/qflatmap_p.h +++ b/src/corelib/tools/qflatmap_p.h @@ -993,6 +993,9 @@ private: containers c; }; +template<class Key, class T, qsizetype N = 256, class Compare = std::less<Key>> +using QVarLengthFlatMap = QFlatMap<Key, T, Compare, QVarLengthArray<Key, N>, QVarLengthArray<T, N>>; + QT_END_NAMESPACE #endif // QFLATMAP_P_H |