Today I will create my own doubly linked list from scratch, with the following demands:
1) it must conform to the demands for an STL container.
2) the size of its iterators must be equal to the size of a single pointer.
3) it will be intrusive: a dereferenced iterator will return a type that is the user data type, but is also derived from a Node class that has pointers to the previous and next element.
4) it must be testable if an iterator is the end() iterator without having access to the list.
5) it must be testable if an iterator is the begin() iterator without having access to the list.
6) it must be possible to insert a new element before any given iterator, including begin and end (in this case the list itself might be needed).Such insertions will not invalidate any existing iterators.
You can follow the progress of the project as a whole here: github.com/Car...
discord: / discord
Негізгі бет C++ - designing an accelerated "gradient descent" algorithm.
Пікірлер