diff --git a/src/queue.h b/src/queue.h index ebafd8af..7e9b35fe 100644 --- a/src/queue.h +++ b/src/queue.h @@ -397,10 +397,12 @@ namespace etl //************************************************************************* /// Gets the oldest value and removes it from the front of the queue and - /// pushes it to the destination queue. + /// pushes it to the destination container. /// If asserts or exceptions are enabled, throws an etl::queue_empty if the queue is empty. + /// NOTE: The destination must support a push(T) member function. //************************************************************************* - void pop_into(iqueue& destination) + template + void pop_into(TContainer& destination) { destination.push(front()); pop(); diff --git a/src/stack.h b/src/stack.h index 85a5c888..d41e38b3 100644 --- a/src/stack.h +++ b/src/stack.h @@ -362,10 +362,11 @@ namespace etl //************************************************************************* /// Removes the oldest item from the top of the stack and pushes it to the - /// top of the destination stack. - /// NOTE: This reverses the stack order. + /// destination container. + /// NOTE: The destination must support a push(T) member function. //************************************************************************* - void pop_into(istack& destination) + template + void pop_into(TContainer& destination) { destination.push(top()); pop();