qSwap: try without -Wno-noexcept
The warning from the comment was probably caused by our noexcept detection code. Now that we use std::is_nothrow_swappable, those warnings should not longer happen. Remove the warning suppression macros, and the #include that was necessary for them. Change-Id: Ib750cb1af4a8da3fb63b16d26ec51a9fb4a93ea1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
parent
6f36ee5167
commit
bb51f0d814
@ -5,7 +5,6 @@
|
||||
#define QTCORE_QSWAP_H
|
||||
|
||||
#include <QtCore/qtconfigmacros.h>
|
||||
#include <QtCore/qcompilerdetection.h>
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
@ -17,10 +16,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QT_WARNING_PUSH
|
||||
// warning: noexcept-expression evaluates to 'false' because of a call to 'void swap(..., ...)'
|
||||
QT_WARNING_DISABLE_GCC("-Wnoexcept")
|
||||
|
||||
template <typename T>
|
||||
constexpr void qSwap(T &value1, T &value2)
|
||||
noexcept(std::is_nothrow_swappable_v<T>)
|
||||
@ -38,8 +33,6 @@ constexpr inline void qt_ptr_swap(T* &lhs, T* &rhs) noexcept
|
||||
rhs = tmp;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QTCORE_QSWAP_H
|
||||
|
Loading…
Reference in New Issue
Block a user