I would notice that this is only an observation, not a rule.
That is, the Container Adapters provided in the STL do not support iteration, since they limit the interface to a particular model:
- The stack can only be processed from one end.
- In the queue, you can only click on one end and remove from the other
However, this is not the rule, and you may decide to create adapters that will support iteration.
source share