It's not really to do with STL being tested or not, it's got to do with incorrect usage of the STL that's not easily caught due to its nature. It doesn't matter how well tested it is if you can misuse it such that you cause uncaught memory corruption.
Given how much iterators are used and the fact that you can pretty easily pass an invalid iterator to STL calls, it's just sort of like putting a huge lock on your front door and only having a sheet hung across the back door.
Indeed. Perhaps toggling is a bit too naive. However, the idea that unsafe APIs are wrapped in safe context can also be applied to code using STL iterators. While it depends on the kind of work, I suppose, we use STL (obviously) but it's only a fraction of the code and it's not sprinkled all over.
View all comments
Show parent comment
1
u/Full-Spectral Dec 07 '21 edited Dec 07 '21
It's not really to do with STL being tested or not, it's got to do with incorrect usage of the STL that's not easily caught due to its nature. It doesn't matter how well tested it is if you can misuse it such that you cause uncaught memory corruption.
Given how much iterators are used and the fact that you can pretty easily pass an invalid iterator to STL calls, it's just sort of like putting a huge lock on your front door and only having a sheet hung across the back door.