deque as a template