ZIB PaperWeb

Container Adaptors


SC 99-41 Gary Powell, Martin Weiser: Container Adaptors


Abstract: The C++ standard template library has many useful containers for data. The standard library includes two adpators, queue, and stack. The authors have extended this model along the lines of relational database semantics. Sometimes the analogy is striking, and we will point it out occasionally. An adaptor allows the standard algorithms to be used on a subset or modification of the data without having to copy the data elements into a new container. The authors provide many useful adaptors which can be used together to produce interesting views of data in a container.
Keywords: C++, STL, views
CR: D.3.3, E.2