Thanks for all of your help so far. Is there any issue with being able to access those elements, for example, next, last, value, etc? Should something be changed with my iterator, node, or list classes?
I also read on a stackoverflow forum that auto can select private classes, in this case node, which shouldn't be able to be accessed. Again, is this a problem? To me, I'm content with using auto in this situation since it's a pain to constantly type out
One last question. When looking at the STL implementation, it refers to Allocators. From http://cplusplus.com/reference/list/list/list/
|explicit list ( size_type n, const T& value= T(), const Allocator& = Allocator() );|
Repetitive sequence constructor: Initializes the container object with its content set to a repetition, n times, of copies of value.
Up until now, I have just ignored the Allocator since I've never used one for any STL container. Is this something I should look into implementing in my code? or should I just ignore it? For the most part, the rest of the functions of an STL list look pretty straight forward. Obviously, I'll have to do some error testing when it comes to seeing if my definitions are correct, much like the situation with my end function. Is there anything that you see or saw in my code thus far that may cause issues down the road?
Thanks again for all of your help though.
Edit: Trying to switch my it type to
yields this error:
C:\Programming\List Practice\main.cpp|275|error: cannot convert 'vp::list<int>::node*' to 'vp::list<int>::iterator*' in initialization|
That makes me assume that auto actually uses a node pointer, which again should be restricted, is irrelevant to me, but shouldn't my iterator class be convertible from a node to prevent needing a node?