From a1e62e7ba14b00ac7c361936a18e7bc42bf1286d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Apr 2019 10:54:54 +0200 Subject: 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 --- src/corelib/tools/qset.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/corelib/tools/qset.h') 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 Hash; public: - inline QSet() Q_DECL_NOTHROW {} + inline QSet() noexcept {} #ifdef Q_COMPILER_INITIALIZER_LISTS inline QSet(std::initializer_list list) { @@ -68,7 +68,7 @@ public: // compiler-generated copy/move ctor/assignment operators are fine! // compiler-generated destructor is fine! - inline void swap(QSet &other) Q_DECL_NOTHROW { q_hash.swap(other.q_hash); } + inline void swap(QSet &other) noexcept { q_hash.swap(other.q_hash); } inline bool operator==(const QSet &other) const { return q_hash == other.q_hash; } @@ -176,20 +176,20 @@ public: typedef std::reverse_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(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(i)); } -- cgit v1.2.3