I'd like to implement a sequence container with the bells and whistles required for an STL class - for example, my own deque class that can use all of the STL algorithms and utilities that the nor开发者_JAVA技巧mal deque class could use. I'm aware all the STL components and how they work, but I'd definitely miss alot trying to do this on my own.
Does anyone know a good tutorial or reference/checklist that I could use for this purpose? I'm trying to reinforce the mechanisms in my mind by making one of these classes.
PS - I'm just looking for a link with the information that I need and a half-sentence description, I don't need a discussion of what is best and why as long as the information is there :)
A container must implement a series of Concepts. A comprehensive list can be found here: http://www.sgi.com/tech/stl/Container.html
Simply implement the requirements there, and you got yourself a container.
精彩评论