diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 8a63e1283b..e041b4132a 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -128,8 +128,6 @@ public: d->copyAppend(size, t); } - inline QList(const QList &other) noexcept : d(other.d) {} - QList(QList &&other) noexcept : d(std::move(other.d)) {} inline QList(std::initializer_list args) : d(Data::allocate(args.size())) { @@ -137,13 +135,6 @@ public: d->copyAppend(args.begin(), args.end()); } - ~QList() /*noexcept(std::is_nothrow_destructible::value)*/ {} - QList &operator=(const QList &other) { d = other.d; return *this; } - QList &operator=(QList &&other) noexcept(std::is_nothrow_destructible::value) - { - d = std::move(other.d); - return *this; - } QList &operator=(std::initializer_list args) { d = DataPointer(Data::allocate(args.size())); @@ -167,6 +158,8 @@ public: std::copy(i1, i2, std::back_inserter(*this)); } + // compiler-generated special member functions are fine! + void swap(QList &other) noexcept { qSwap(d, other.d); } friend bool operator==(const QList &l, const QList &r)