Lines Matching refs:T
22 template<typename T>
24 LinkedListEntry<T>* next;
25 T* element;
31 template<typename T, typename Allocator>
45 void push_front(T* const element) { in push_front()
46 LinkedListEntry<T>* new_entry = Allocator::alloc(); in push_front()
55 void push_back(T* const element) { in push_back()
56 LinkedListEntry<T>* new_entry = Allocator::alloc(); in push_back()
67 T* pop_front() { in pop_front()
72 LinkedListEntry<T>* entry = head_; in pop_front()
73 T* element = entry->element; in pop_front()
84 T* front() const { in front()
94 LinkedListEntry<T>* p = head_; in clear()
104 visit([&] (T* si) { in for_each()
112 for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) { in visit()
122 for (LinkedListEntry<T>* e = head_, *p = nullptr; e != nullptr;) { in remove_if()
124 LinkedListEntry<T>* next = e->next; in remove_if()
140 T* find_if(F predicate) const { in find_if()
141 for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) { in find_if()
150 size_t copy_to_array(T* array[], size_t array_length) const { in copy_to_array()
152 for (LinkedListEntry<T>* e = head_; sz < array_length && e != nullptr; e = e->next) { in copy_to_array()
159 bool contains(const T* el) const { in contains()
160 for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) { in contains()
168 static LinkedList make_list(T* const element) { in make_list()
169 LinkedList<T, Allocator> one_element_list; in make_list()
175 LinkedListEntry<T>* head_;
176 LinkedListEntry<T>* tail_;