开发者

Name a good guide for the implementation of an STL compatible sequence container)

开发者 https://www.devze.com 2023-04-03 07:59 出处:网络
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开发

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消