D
deodiaus
I was looking at Plauger's <vector> template as implemented in MS DEV
6 owned by HP.
I modified it to implement <cvector>, a circular vector template. I
modified the obvious, e. g. replaced vector by cvector, and removed
some redundant defns.
A circular template class also has
cvector.end() the same as cvector.begin()
I am wondering if I should change operator++ so that when the iterator
points to end(), it will wrap around to begin(), but was wondering if
that might mess up other template functions.
I handle the wrap around by adding a check in my code (not in
<cvector>) so that if I reached the end(), I reset the iterator to
begin().
Has anyone done this all ready? Am I using the right template, maybe
I should be using <list>?
6 owned by HP.
I modified it to implement <cvector>, a circular vector template. I
modified the obvious, e. g. replaced vector by cvector, and removed
some redundant defns.
A circular template class also has
cvector.end() the same as cvector.begin()
I am wondering if I should change operator++ so that when the iterator
points to end(), it will wrap around to begin(), but was wondering if
that might mess up other template functions.
I handle the wrap around by adding a check in my code (not in
<cvector>) so that if I reached the end(), I reset the iterator to
begin().
Has anyone done this all ready? Am I using the right template, maybe
I should be using <list>?