This module implements a priority deque adaptor, allowing to push/pop from both ends of the container:
Example
typedef vector_view<uint32*> vector_type;
typedef priority_deque<uint32, vector_type> deque_type;
uint32 deque_storage[4] = { 5, 3, 8, 1 }
deque_type deque( vector_type( 4u, deque_storage ) );
printf( "%u\n", deque.top() );
deque.pop_top();
printf( "%u\n", deque.bottom() );
deque.pop_bottom();
printf( "%u\n", deque.top() );
deque.pop_top();
deque.push( 7 );
printf( "%u\n", deque.bottom() );
deque.pop_bottom();
printf( "%u\n", deque.bottom() );
deque.pop_bottom();