diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h index de5c31e91f..083290f9b7 100644 --- a/src/corelib/thread/qresultstore.h +++ b/src/corelib/thread/qresultstore.h @@ -149,6 +149,8 @@ public: template int moveResult(int index, T &&result) { + static_assert(!std::is_reference_v, "trying to move from an lvalue!"); + if (containsValidResultItem(index)) // reject if already present return -1;