Thanks to visit codestin.com
Credit goes to chromium.googlesource.com

blob: da3639e2731047476d7172b59d9babc0b0fec8cc [file] [log] [blame]
Avi Drissmane4622aa2022-09-08 20:36:061// Copyright 2017 The Chromium Authors
Brett Wilson1f07f20e2017-10-02 18:55:282// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef BASE_CONTAINERS_STACK_H_
6#define BASE_CONTAINERS_STACK_H_
7
8#include <stack>
9
10#include "base/containers/circular_deque.h"
11
12namespace base {
13
14// Provides a definition of base::stack that's like std::stack but uses a
Bence Békya9838e02018-05-29 15:23:5915// base::circular_deque instead of std::deque. Since std::stack is just a
Brett Wilson1f07f20e2017-10-02 18:55:2816// wrapper for an underlying type, we can just provide a typedef for it that
17// defaults to the base circular_deque.
18template <class T, class Container = circular_deque<T>>
19using stack = std::stack<T, Container>;
20
21} // namespace base
22
23#endif // BASE_CONTAINERS_STACK_H_