0

I'm trying to learn a bit about data structures and writing containers which could be used by as much of "the C++" as possible. I know that to support ranged for a class needs to have begin() and end() or that std::back_inserter uses push_back() to do its job but that's about all.

Is there a list of this type of requirements a container must meet to be fully compatible with all the iterators, container adaptors and algorithms?

Big Temp
  • 434
  • 4
  • 12
  • 1
    Handy reading: [Writing your own STL Container](https://stackoverflow.com/questions/7758580/writing-your-own-stl-container). – user4581301 Jun 09 '20 at 22:33
  • 1
    @cigien The standard specifies what standard containers should be, not necessarily what is the bare minimum a custom container should have to make use of the rest of the STL – Big Temp Jun 09 '20 at 22:42
  • 1
    Different containers have different requirements for what kind of operations their elements must support. There is no standard "all containers must do this" kind of requirement – Remy Lebeau Jun 09 '20 at 22:49

0 Answers0