QVector: add a construction from QArrayDataPointerRef
To be used to build QVectors out of Q_ARRAY_LITERALs. Change-Id: I6105fd1f2d13f6ce923b79276b4aa7a7f5eff193 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
parent
7000b70821
commit
43c410867b
|
|
@ -80,6 +80,7 @@ public:
|
|||
QVector<T> &operator=(std::initializer_list<T> args);
|
||||
template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator> = true>
|
||||
inline QVector(InputIterator first, InputIterator last);
|
||||
explicit QVector(QArrayDataPointerRef<T> ref) noexcept : d(ref.ptr) {}
|
||||
|
||||
bool operator==(const QVector<T> &v) const;
|
||||
inline bool operator!=(const QVector<T> &v) const { return !(*this == v); }
|
||||
|
|
|
|||
|
|
@ -251,6 +251,11 @@
|
|||
The value type of \c InputIterator must be convertible to \c T.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T> QVector<T>::QVector(QArrayDataPointerRef<T> ref)
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> QVector<T>::~QVector()
|
||||
|
||||
Destroys the vector.
|
||||
|
|
|
|||
Loading…
Reference in New Issue