Commit 4219185d authored by Davis King's avatar Davis King

Allow enqueueing to a pipe from rvalues.

parent bcf98e05
...@@ -119,6 +119,10 @@ namespace dlib ...@@ -119,6 +119,10 @@ namespace dlib
T& item T& item
); );
bool enqueue (
T&& item
) { return enqueue(item); }
bool dequeue ( bool dequeue (
T& item T& item
); );
...@@ -128,6 +132,11 @@ namespace dlib ...@@ -128,6 +132,11 @@ namespace dlib
unsigned long timeout unsigned long timeout
); );
bool enqueue_or_timeout (
T&& item,
unsigned long timeout
) { return enqueue_or_timeout(item,timeout); }
bool dequeue_or_timeout ( bool dequeue_or_timeout (
T& item, T& item,
unsigned long timeout unsigned long timeout
......
...@@ -219,6 +219,11 @@ namespace dlib ...@@ -219,6 +219,11 @@ namespace dlib
- #item == item (i.e. the value of item is unchanged) - #item == item (i.e. the value of item is unchanged)
!*/ !*/
bool enqueue (T&& item) { return enqueue(item); }
/*!
enable enqueueing from rvalues
!*/
bool enqueue_or_timeout ( bool enqueue_or_timeout (
T& item, T& item,
unsigned long timeout unsigned long timeout
...@@ -249,6 +254,11 @@ namespace dlib ...@@ -249,6 +254,11 @@ namespace dlib
- #item == item (i.e. the value of item is unchanged) - #item == item (i.e. the value of item is unchanged)
!*/ !*/
bool enqueue_or_timeout (T&& item, unsigned long timeout) { return enqueue_or_timeout(item,timeout); }
/*!
enable enqueueing from rvalues
!*/
bool dequeue ( bool dequeue (
T& item T& item
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment