summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r--src/corelib/tools/qvector.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index ebe6527d89..62fbdb4a2a 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -326,6 +326,13 @@ private:
class AlignmentDummy { Data header; T array[1]; };
};
+#if defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201606
+template <typename InputIterator,
+ typename ValueType = typename std::iterator_traits<InputIterator>::value_type,
+ QtPrivate::IfIsInputIterator<InputIterator> = true>
+QVector(InputIterator, InputIterator) -> QVector<ValueType>;
+#endif
+
#ifdef Q_CC_MSVC
// behavior change: an object of POD type constructed with an initializer of the form ()
// will be default-initialized