| 6 | #define BASE_CONTAINERS_STACK_H_ |
| 7 |
| 8 | #include <stack> |
| 9 |
| 10 | #include "base/containers/circular_deque.h" |
| 11 |
| 12 | namespace base { |
| 13 |
| 14 | // Provides a definition of base::stack that's like std::stack but uses a |
| 15 | // base::circular_deque instead of std::deque. Since std::stack is just a |
| 16 | // wrapper for an underlying type, we can just provide a typedef for it that |
| 17 | // defaults to the base circular_deque. |
| 18 | template <class T, class Container = circular_deque<T>> |
| 19 | using stack = std::stack<T, Container>; |
| 20 |
| 21 | } // namespace base |
| 22 |
| 23 | #endif // BASE_CONTAINERS_STACK_H_ |
| 24 |