added move support to pop queque

This commit is contained in:
gabime
2014-02-01 01:47:37 +02:00
parent 0cf139bf8a
commit 65e8349c60
2 changed files with 55 additions and 10 deletions

View File

@@ -75,7 +75,7 @@ public:
if (!item_pushed_cond_.wait_until(ul, clock::now() + timeout, [this]() { return !this->q_.empty(); }))
return false;
}
item = q_.front();
item = std::move(q_.front());
q_.pop();
if (q_.size() >= max_size_ - 1)
{