-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathctl_stack.h
More file actions
58 lines (54 loc) · 1.07 KB
/
Copy pathctl_stack.h
File metadata and controls
58 lines (54 loc) · 1.07 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* LIFO deque
SPDX-License-Identifier: MIT */
#ifndef T
#error "Template type T undefined for <ctl_stack.h>"
#endif
#define push_back push
#define pop_back pop
#define back top
#define at __AT
#define front __FRONT
#define begin __BEGIN
#define end __END
#define push_front __PUSH_FRONT
#define pop_front __POP_FRONT
#define erase __ERASE
#define insert __INSERT
#define resize __RESIZE
#define assign __ASSIGN
#define clear __CLEAR
#define ranged_sort __RANGED_SORT
#define sort __SORT
#define range __RANGE
#define each __EACH
#define step __STEP
#define remove_if __REMOVE_IF
// Replace the three instances of `deq` below
// with either `vec` or `list`, depending on your use case.
#define CTL_STACK
#define deq stack
#define _deq _stack
#include <./ctl_deque.h>
#undef _deq
#undef deq
#undef CTL_STACK
#undef push_back
#undef pop_back
#undef back
#undef at
#undef front
#undef begin
#undef end
#undef push_front
#undef pop_front
#undef erase
#undef insert
#undef resize
#undef assign
#undef clear
#undef ranged_sort
#undef sort
#undef range
#undef each
#undef step
#undef remove_if