diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-07-28 14:43:24 +0300 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-08-07 23:09:03 +0300 |
commit | 247ab241c783f776489d8bc348a84cb533079241 (patch) | |
tree | d64ee3dc0ba59d86a6f723e7dea533c7e3b55df9 /src/corelib/tools/qlist.h | |
parent | bf99c4bf553ea750f68745133960084f0b4c0490 (diff) |
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 <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r-- | src/corelib/tools/qlist.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 70bbc11ad2..471e16886f 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -446,6 +446,13 @@ private: inline int count_impl(const T &, QListData::ArrayCompatibleLayout) const; }; +#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> +QList(InputIterator, InputIterator) -> QList<ValueType>; +#endif + #if defined(Q_CC_BOR) template <typename T> Q_INLINE_TEMPLATE T &QList<T>::Node::t() |