summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qset.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-02 10:54:54 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-03 13:49:45 +0000
commita1e62e7ba14b00ac7c361936a18e7bc42bf1286d (patch)
tree50f5188dbc6092aca660eec970d71fe5ce1706ae /src/corelib/tools/qset.h
parent6c761a0db11b7a2b0104dbf46607ca396ae7ee2d (diff)
Replace Q_DECL_NOEXCEPT with noexcept in corelib
In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qset.h')
-rw-r--r--src/corelib/tools/qset.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index 6640c8486d..d7fbc12b99 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -56,7 +56,7 @@ class QSet
typedef QHash<T, QHashDummyValue> Hash;
public:
- inline QSet() Q_DECL_NOTHROW {}
+ inline QSet() noexcept {}
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QSet(std::initializer_list<T> list)
{
@@ -68,7 +68,7 @@ public:
// compiler-generated copy/move ctor/assignment operators are fine!
// compiler-generated destructor is fine!
- inline void swap(QSet<T> &other) Q_DECL_NOTHROW { q_hash.swap(other.q_hash); }
+ inline void swap(QSet<T> &other) noexcept { q_hash.swap(other.q_hash); }
inline bool operator==(const QSet<T> &other) const
{ return q_hash == other.q_hash; }
@@ -176,20 +176,20 @@ public:
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
inline iterator begin() { return q_hash.begin(); }
- inline const_iterator begin() const Q_DECL_NOTHROW { return q_hash.begin(); }
- inline const_iterator cbegin() const Q_DECL_NOTHROW { return q_hash.begin(); }
- inline const_iterator constBegin() const Q_DECL_NOTHROW { return q_hash.constBegin(); }
+ inline const_iterator begin() const noexcept { return q_hash.begin(); }
+ inline const_iterator cbegin() const noexcept { return q_hash.begin(); }
+ inline const_iterator constBegin() const noexcept { return q_hash.constBegin(); }
inline iterator end() { return q_hash.end(); }
- inline const_iterator end() const Q_DECL_NOTHROW { return q_hash.end(); }
- inline const_iterator cend() const Q_DECL_NOTHROW { return q_hash.end(); }
- inline const_iterator constEnd() const Q_DECL_NOTHROW { return q_hash.constEnd(); }
+ inline const_iterator end() const noexcept { return q_hash.end(); }
+ inline const_iterator cend() const noexcept { return q_hash.end(); }
+ inline const_iterator constEnd() const noexcept { return q_hash.constEnd(); }
reverse_iterator rbegin() { return reverse_iterator(end()); }
reverse_iterator rend() { return 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()); }
+ const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
+ const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); }
+ const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); }
iterator erase(iterator i)
{ return erase(m2c(i)); }
@@ -252,14 +252,14 @@ public:
private:
Hash q_hash;
- static const_iterator m2c(iterator it) Q_DECL_NOTHROW
+ static const_iterator m2c(iterator it) noexcept
{ return const_iterator(typename Hash::const_iterator(it.i.i)); }
bool isValidIterator(const iterator &i) const
{
return q_hash.isValidIterator(reinterpret_cast<const typename Hash::iterator&>(i));
}
- bool isValidIterator(const const_iterator &i) const Q_DECL_NOTHROW
+ bool isValidIterator(const const_iterator &i) const noexcept
{
return q_hash.isValidIterator(reinterpret_cast<const typename Hash::const_iterator&>(i));
}