summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qflatmap_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qflatmap_p.h')
-rw-r--r--src/corelib/tools/qflatmap_p.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h
index 68ab567439..d2c0d45b79 100644
--- a/src/corelib/tools/qflatmap_p.h
+++ b/src/corelib/tools/qflatmap_p.h
@@ -83,6 +83,7 @@ public:
}
};
+namespace qflatmap {
namespace detail {
template <class T>
class QFlatMapMockPointer
@@ -100,6 +101,7 @@ public:
}
};
} // namespace detail
+} // namespace qflatmap
template<class Key, class T, class Compare = std::less<Key>, class KeyContainer = QList<Key>,
class MappedContainer = QList<T>>
@@ -107,8 +109,9 @@ class QFlatMap : private QFlatMapValueCompare<Key, T, Compare>
{
static_assert(std::is_nothrow_destructible_v<T>, "Types with throwing destructors are not supported in Qt containers.");
- template <class U>
- using mock_pointer = detail::QFlatMapMockPointer<U>;
+ template<class U>
+ using mock_pointer = qflatmap::detail::QFlatMapMockPointer<U>;
+
public:
using key_type = Key;
using mapped_type = T;
@@ -1096,7 +1099,9 @@ private:
containers c;
};
-template<class Key, class T, qsizetype N = 256, class Compare = std::less<Key>>
+template <class Key, class T,
+ qsizetype N = QVarLengthArrayDefaultPrealloc,
+ class Compare = std::less<Key>>
using QVarLengthFlatMap = QFlatMap<Key, T, Compare, QVarLengthArray<Key, N>, QVarLengthArray<T, N>>;
QT_END_NAMESPACE