File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2
2
#define FORWARD_LIST_FORWARD_TLIST_H
3
3
4
4
#include " forward_tlist_node.h"
5
- #include < cstddef>
6
5
#include < memory>
7
6
8
7
namespace tlib {
@@ -11,11 +10,16 @@ namespace tlib{
11
10
using allocator_type = allocator;
12
11
using iterator = tlib::forward_tlist_iterator<T>;
13
12
using value_type = typename allocator::value_type;
13
+ using pointer = typename allocator::pointer;
14
+ using reference = typename allocator::reference;
15
+ using const_reference = typename allocator::const_reference;
16
+ using size_type = typename allocator::size_type;
17
+
14
18
public:
15
19
forward_tlist (): head(nullptr ), tail(nullptr ), size_(0 ) {};
16
20
~forward_tlist () { delete head; }
17
21
bool empty () { return head == nullptr ; }
18
- std:: size_t size () const ;
22
+ size_type size () const ;
19
23
/* *
20
24
* Prepends the given element to the beginning of the container
21
25
* No iterators are invalidated
@@ -26,7 +30,7 @@ namespace tlib{
26
30
iterator end () { return forward_tlist_iterator<T>(nullptr ); }
27
31
28
32
private:
29
- std:: size_t size_;
33
+ size_type size_;
30
34
forward_tlist_node<T> *head;
31
35
forward_tlist_node<T> *tail;
32
36
}; // class forward_tlist
You can’t perform that action at this time.
0 commit comments