summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
authorThe Qt Project <gerrit-noreply@qt-project.org>2019-10-14 08:49:14 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2019-10-14 08:49:14 +0000
commiteba59bfd14d0ea29f36e80be81137d26cc67e23a (patch)
tree69ff8601b3d4a62bea38e1a32245f45cb744aaac /src/corelib/tools/qvector.h
parentf03ac58b1ecc24f01cb83b275a9b6088f9483545 (diff)
parentf4b4c4f79b629498f3cddbbc10df8c1b4d6020d9 (diff)
Merge "Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake" into wip/cmake
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