summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbitarray.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qbitarray.h')
-rw-r--r--src/corelib/tools/qbitarray.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h
index 60cdc9c..bd79904 100644
--- a/src/corelib/tools/qbitarray.h
+++ b/src/corelib/tools/qbitarray.h
@@ -63,6 +63,10 @@ public:
explicit QBitArray(int size, bool val = false);
QBitArray(const QBitArray &other) : d(other.d) {}
inline QBitArray &operator=(const QBitArray &other) { d = other.d; return *this; }
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QBitArray &operator=(QBitArray &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
inline int size() const { return (d.size() << 3) - *d.constData(); }
inline int count() const { return (d.size() << 3) - *d.constData(); }