I'd highly recommend STL containers instead of implement by yourself, which is a waste of time these days. |
Sure when the STL has the data structure you need, you should probably use it, but the STL doesn't have everything, pretty much just the bare minimum.
It didn't even have hash tables or hash maps until very recently and those are a few of the most useful data structures of all.
In many C++ applications you need to implement your own custom data structures. Especially when it comes to graphs / networks where you need a lot of special rules and requirements.
Then you have quad trees, and other various other tree variants, and the list can go on.
And for different categories of data structures, there are also different ways to implement them which have trade offs. The STL doesn't even guarantee the implementation, let alone have multiple options, so you cannot choose AVL tree or B tree or Red and Black tree. If your program needs to do what the OP described, then you probably should not use an STL container because you want to be sure to use the variant with the best performance for your application. You might go looking for other libraries, or implement yourself if it's important enough and you are good enough.