Lines Matching refs:T

33 template<typename T>
35 LinkedListEntry<T>* next;
36 T* element;
40 template<typename T>
44 LinkedListIterator(const LinkedListIterator<T>& that) : entry_(that.entry_) {} in LinkedListIterator()
45 explicit LinkedListIterator(LinkedListEntry<T>* entry) : entry_(entry) {} in LinkedListIterator()
47 LinkedListIterator<T>& operator=(const LinkedListIterator<T>& that) {
52 LinkedListIterator<T>& operator++() {
57 T* const operator*() {
61 bool operator==(const LinkedListIterator<T>& that) const {
65 bool operator!=(const LinkedListIterator<T>& that) const {
70 LinkedListEntry<T> *entry_;
76 template<typename T, typename Allocator>
79 typedef LinkedListIterator<T> iterator;
80 typedef T* value_type;
93 void push_front(T* const element) { in push_front()
94 LinkedListEntry<T>* new_entry = Allocator::alloc(); in push_front()
103 void push_back(T* const element) { in push_back()
104 LinkedListEntry<T>* new_entry = Allocator::alloc(); in push_back()
115 T* pop_front() { in pop_front()
120 LinkedListEntry<T>* entry = head_; in pop_front()
121 T* element = entry->element; in pop_front()
132 T* front() const { in front()
142 LinkedListEntry<T>* p = head_; in clear()
156 visit([&] (T* si) { in for_each()
164 for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) { in visit()
174 for (LinkedListEntry<T>* e = head_, *p = nullptr; e != nullptr;) { in remove_if()
176 LinkedListEntry<T>* next = e->next; in remove_if()
197 void remove(T* element) { in remove()
198 remove_if([&](T* e) { in remove()
204 T* find_if(F predicate) const { in find_if()
205 for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) { in find_if()
222 iterator find(T* value) const { in find()
223 for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) { in find()
232 size_t copy_to_array(T* array[], size_t array_length) const { in copy_to_array()
234 for (LinkedListEntry<T>* e = head_; sz < array_length && e != nullptr; e = e->next) { in copy_to_array()
241 bool contains(const T* el) const { in contains()
242 for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) { in contains()
250 static LinkedList make_list(T* const element) { in make_list()
251 LinkedList<T, Allocator> one_element_list; in make_list()
258 for_each([&](T*) { ++result; }); in size()
263 LinkedListEntry<T>* head_;
264 LinkedListEntry<T>* tail_;