-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathdeque.h
More file actions
42 lines (35 loc) · 1.22 KB
/
deque.h
File metadata and controls
42 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef _GHLIBCPP_DEQUE
#define _GHLIBCPP_DEQUE
#include <iterator>
#include <string>
#include <initializer_list>
#include <empty.h>
namespace std {
template <class T, class Allocator = std::allocator<T>> class deque {
public:
typedef size_t size_type;
typedef T value_type;
typedef value_type &reference;
typedef const value_type &const_reference;
deque() = default;
deque(std::initializer_list<T>, const Allocator & = Allocator());
typedef __iterator<T> iterator;
typedef __iterator<T> const_iterator;
iterator begin();
iterator end();
iterator insert(const_iterator pos, const T &x);
iterator insert(const_iterator pos, T &&x);
iterator insert(const_iterator pos, size_type n, const T &x);
template <class InputIterator>
iterator insert(const_iterator pos, InputIterator first, InputIterator last);
iterator insert(const_iterator pos, initializer_list<T>);
bool empty() const;
template <class... Args> void emplace_front(Args &&...args);
template <class... Args> void emplace_back(Args &&...args);
template <class... Args> iterator emplace(const_iterator pos, Args &&...args);
void push_back(const T &x);
void push_back(T &&x);
void pop_back();
};
} // namespace std
#endif // _GHLIBCPP_DEQUE