#pragma once #include template class ListRange; template class ListIterator; template struct ListLink { ListLink * prev; ListLink * next; T value; }; template class List { public: size_t size() const; void push_back(T & el); void remove(const T & val); void pop_back(); void clear(); T & operator [] (size_t index) const; ListIterator begin() const; ListIterator end() const; ListRange range() const; private: ListLink * head = nullptr; ListLink * tail = nullptr; size_t length = 0; }; #include "List.hpp"