For reasons of efficiency it's not possible to have every container work with every generic algorithm -- STL Tutorial and Reference Guide.
So i'm learning about STL and i was reading the mentioned book and trying simultaneously to see the justification behind this categorization of iterators, the book doesn't actually go beyond the quotes in explaining the why behind this categorization.
I understand that some generic algorithms requires certain abilities from their containers (for example random access for sort algorithms) so clearly not all containers can be all plugged in all generic algorithms for efficiency reasoning.
but this answer isn't much sufficient and it seems to me like it's only one aspect of this decision design, before reading the section i thought about the categorization as more of a safety belt (because of the naming...) but this aspect is not even mentioned in the book, all in all the book doesn't go much in details about this design decision ,if you can, could you please go in much detail about the why behind this ?