From 247ab241c783f776489d8bc348a84cb533079241 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 28 Jul 2019 14:43:24 +0300 Subject: QVector/QList/QLinkedList/QVarLengthArray/QSet: add missing deduction guides Amends 2e1763d83a1dacfc5b747934fb77fa7cec7bfe47. The new range ctors need deduction guides, since the compiler can't deduce the value_type from a pair of iterators. Change-Id: I3ec1e5f91305b317c443b6a70246be416b55bad9 Reviewed-by: Volker Hilsheimer Reviewed-by: Thiago Macieira --- src/corelib/tools/qvector.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/corelib/tools/qvector.h') 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 ::value_type, + QtPrivate::IfIsInputIterator = true> +QVector(InputIterator, InputIterator) -> QVector; +#endif + #ifdef Q_CC_MSVC // behavior change: an object of POD type constructed with an initializer of the form () // will be default-initialized -- cgit v1.2.3