GCC11.1 warning: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]

master
ZiRee 2022-07-28 16:12:17 +00:00
parent 1e4f2ec07e
commit 59becbde75
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ namespace LL
TimePoint until = TimePoint::clock::now() + std::chrono::hours(24);
pop_result popped = tryPopUntil_(lock, until, tt);
if (popped == POPPED)
return std::move(tt);
return tt;
// DONE: throw, just as super::pop() does
if (popped == DONE)