I have to implement this doubly linked list. The list needs a front pointer pointing to the first valid element and a back pointer pointing to the last valid element.
My problem with this code is with the last few lines when I have to implement T& back. Front was easy to do because it's the same as the begin iterator but i can't figure out how to do back. What I have right now is not working. I think my problem is the way i defined end
It depends on what you've used DList::m_back. I would have thought that it should point to the last entry (as you need to traverse forward and backward), in which case your implementation of back() should work. But I don't know what you've done with it.