inline const_iterator end() const { return ptr + s; }
inline const_iterator cend() const { return ptr + s; }
inline const_iterator constEnd() const { return ptr + s; }
- iterator insert(iterator before, int n, const T &x);
- inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
- iterator erase(iterator begin, iterator end);
- inline iterator erase(iterator pos) { return erase(pos, pos+1); }
+ iterator insert(const_iterator before, int n, const T &x);
+ inline iterator insert(const_iterator before, const T &x) { return insert(before, 1, x); }
+ iterator erase(const_iterator begin, const_iterator end);
+ inline iterator erase(const_iterator pos) { return erase(pos, pos+1); }
private:
friend class QPodList<T, Prealloc>;
template <class T, int Prealloc>
-Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(iterator before, size_type n, const T &t)
+Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, size_type n, const T &t)
{
int offset = int(before - ptr);
if (n != 0) {
}
template <class T, int Prealloc>
-Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::erase(iterator abegin, iterator aend)
+Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::erase(const_iterator abegin, const_iterator aend)
{
int f = int(abegin - ptr);
int l = int(aend - ptr);
\sa constBegin(), end()
*/
-/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(iterator pos)
+/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(const_iterator pos)
\since 4.8
Removes the item pointed to by the iterator \a pos from the
\sa insert(), remove()
*/
-/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(iterator begin, iterator end)
+/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(const_iterator begin, const_iterator end)
\overload
\since 4.8
vector.
*/
-/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(iterator before, const T &value)
+/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(const_iterator before, const T &value)
\overload
\since 4.8
\a before. Returns an iterator pointing at the inserted item.
*/
-/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(iterator before, int count, const T &value)
+/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(const_iterator before, int count, const T &value)
\since 4.8
Inserts \a count copies of \a value in front of the item pointed to