this code compiles and works fine without comment, but with comment /*>*/ - you can see a compiler crash:)
LOG:
------ Build started: Project: test_, Configuration: Debug Win32 ------
Compiling...
test_.cpp
e:\test_\test_\test_.cpp(13) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1411)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Build log was saved at "file://e:\test_\test_\Debug\BuildLog.htm"
test_ - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
You might want to consider doing something with vector<>::erase(), as it now has the potential
to leak memory.
One other thing to consider is making a more friendly iterator. The problem now is that you have
to double dereference the iterator to get at the actual type. boost::ptr_vector<> provides an
iterator that does the pointer dereference for you.
You might also consider making your constructor explicit, and use size_t (or std::vector<>::size_type)
instead of int.
And of course inheriting from an STL container is a bit dangerous, which I'm sure you already know.