Poster of Linux kernelThe best gift for a Linux geek
Containers

Containers

Section: C Library Functions (3) Updated: 27 Aug 2009
Local index Up
 

NAME

Containers -

 

SYNOPSIS

 

Classes


class basic_string< _CharT, _Traits, _Alloc >
Managing sequences of characters and character-like objects.
class bitset< _Nb >
The bitset class represents a fixed-size sequence of bits.
class deque< _Tp, _Alloc >
A standard container using fixed-size memory allocation and constant-time manipulation of elements at either end.
class list< _Tp, _Alloc >
A standard container with linear time access to elements, and fixed time insertion/deletion at any point in the sequence.
class map< _Key, _Tp, _Compare, _Alloc >
A standard container made up of (key,value) pairs, which can be retrieved based on a key, in logarithmic time.
class multimap< _Key, _Tp, _Compare, _Alloc >
A standard container made up of (key,value) pairs, which can be retrieved based on a key, in logarithmic time.
class multiset< _Key, _Compare, _Alloc >
A standard container made up of elements, which can be retrieved in logarithmic time.
class priority_queue< _Tp, _Sequence, _Compare >
A standard container automatically sorting its contents.
class queue< _Tp, _Sequence >
A standard container giving FIFO behavior.
class set< _Key, _Compare, _Alloc >
A standard container made up of unique keys, which can be retrieved in logarithmic time.
class stack< _Tp, _Sequence >
A standard container giving FILO behavior.
class vector< _Tp, _Alloc >
A standard container which offers fixed time access to individual elements in any order.
class vector< bool, _Alloc >
A specialization of vector for booleans which offers fixed time access to individual elements in any order.  

Detailed Description

Containers are collections of objects.

A container may hold any type which meets certain requirements, but the type of contained object is chosen at compile time, and all objects in a given container must be of the same type. (Polymorphism is possible by declaring a container of pointers to a base class and then populating it with pointers to instances of derived classes. Variant value types such as the any class from Boost can also be used.

All contained types must be Assignable and CopyConstructible. Specific containers may place additional requirements on the types of their contained objects.

Containers manage memory allocation and deallocation themselves when storing your objects. The objects are destroyed when the container is itself destroyed. Note that if you are storing pointers in a container, delete is not automatically called on the pointers before destroying them.

All containers must meet certain requirements, summarized in tables.

The standard containers are further refined into Sequences and Associative Containers.  

Author

Generated automatically by Doxygen for libstdc++ from the source code.


 

Index

NAME
SYNOPSIS
Classes
Detailed Description
Author

This document was created by man2html, using the manual pages.
Time: 22:36:32 GMT, April 16, 2011