Change-Id: I373e07f479c11b172dab35ed7e5b62724aa50a1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
# endif
#endif
+#ifdef Q_COMPILER_RVALUE_REFS
+#define qMove(x) std::move(x)
+#else
+#define qMove(x) (x)
+#endif
+
#endif // QCOMPILERDETECTION_H
{Debugging Techniques}
*/
+/*!
+ \macro qMove(x)
+ \relates <QtGlobal>
+
+ It expands to "std::move" if your compiler supports that C++11 function, or to nothing
+ otherwise.
+*/
+
QT_END_NAMESPACE
c1 = newInstance<Container>();
QVERIFY(c1.size() == 4);
QVERIFY(c1 == newInstance<Container>());
+ Container c2 = qMove(c1);
+ QVERIFY(c2.size() == 4);
+ QVERIFY(c2 == newInstance<Container>());
}
}