QVector: mark const variants of begin()/end() nothrow

Change-Id: Id08e692bbfedb43911ffbbfdf09aa6b68a4aa1f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2015-04-17 09:13:47 +02:00
parent a11b631752
commit 84770d6375

View File

@ -192,29 +192,29 @@ public:
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
#if !defined(QT_STRICT_ITERATORS) || defined(Q_QDOC)
inline iterator begin() { detach(); return d->begin(); }
inline const_iterator begin() const { return d->constBegin(); }
inline const_iterator cbegin() const { return d->constBegin(); }
inline const_iterator constBegin() const { return d->constBegin(); }
inline const_iterator begin() const Q_DECL_NOTHROW { return d->constBegin(); }
inline const_iterator cbegin() const Q_DECL_NOTHROW { return d->constBegin(); }
inline const_iterator constBegin() const Q_DECL_NOTHROW { return d->constBegin(); }
inline iterator end() { detach(); return d->end(); }
inline const_iterator end() const { return d->constEnd(); }
inline const_iterator cend() const { return d->constEnd(); }
inline const_iterator constEnd() const { return d->constEnd(); }
inline const_iterator end() const Q_DECL_NOTHROW { return d->constEnd(); }
inline const_iterator cend() const Q_DECL_NOTHROW { return d->constEnd(); }
inline const_iterator constEnd() const Q_DECL_NOTHROW { return d->constEnd(); }
#else
inline iterator begin(iterator = iterator()) { detach(); return d->begin(); }
inline const_iterator begin(const_iterator = const_iterator()) const { return d->constBegin(); }
inline const_iterator cbegin(const_iterator = const_iterator()) const { return d->constBegin(); }
inline const_iterator constBegin(const_iterator = const_iterator()) const { return d->constBegin(); }
inline const_iterator begin(const_iterator = const_iterator()) const Q_DECL_NOTHROW { return d->constBegin(); }
inline const_iterator cbegin(const_iterator = const_iterator()) const Q_DECL_NOTHROW { return d->constBegin(); }
inline const_iterator constBegin(const_iterator = const_iterator()) const Q_DECL_NOTHROW { return d->constBegin(); }
inline iterator end(iterator = iterator()) { detach(); return d->end(); }
inline const_iterator end(const_iterator = const_iterator()) const { return d->constEnd(); }
inline const_iterator cend(const_iterator = const_iterator()) const { return d->constEnd(); }
inline const_iterator constEnd(const_iterator = const_iterator()) const { return d->constEnd(); }
inline const_iterator end(const_iterator = const_iterator()) const Q_DECL_NOTHROW { return d->constEnd(); }
inline const_iterator cend(const_iterator = const_iterator()) const Q_DECL_NOTHROW { return d->constEnd(); }
inline const_iterator constEnd(const_iterator = const_iterator()) const Q_DECL_NOTHROW { return d->constEnd(); }
#endif
reverse_iterator rbegin() { return reverse_iterator(end()); }
reverse_iterator rend() { return reverse_iterator(begin()); }
const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); }
const_reverse_iterator crend() const { return const_reverse_iterator(begin()); }
const_reverse_iterator rbegin() const Q_DECL_NOTHROW { return const_reverse_iterator(end()); }
const_reverse_iterator rend() const Q_DECL_NOTHROW { return const_reverse_iterator(begin()); }
const_reverse_iterator crbegin() const Q_DECL_NOTHROW { return const_reverse_iterator(end()); }
const_reverse_iterator crend() const Q_DECL_NOTHROW { return const_reverse_iterator(begin()); }
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);