Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

[Home]Associative Sequence

Description

An Associative Sequence is a Sequence which allows efficient retrieval of elements based on keys. For some of associative sequences such as set it is guaranteed that no two elements have the same key. Others, such as multiset, allow multiple elements with the same key.

Refinement of

Sequence

Valid expressions

In addition to Sequence's expressions the following expressions are valid.

 Expression  Expression type  
has_key<s,k>::typeA model of boolean Integral Constant
count<s,k>::typeA model of Integral Constant
order<s,k>::typeA model of Integral Constant or void_
at<s,k>::typeA type
at<s,k,default>::typeA type

Expression semantics

 Expression  Complexity  Precondition  Semantics  Postcondition  
has_key<s,k>::typeAmortized constant time
count<s,k>::typeAmortized constant time
order<s,k>::typeAmortized constant time
at<s,k>::typeAmortized constant time

Invariants

For any associative sequence s the following invariants always hold:

Models

Notes

See also

Sequences, Forward Sequence, Extensible Associative Sequence,


Table of Contents
Last edited October 25, 2003 7:40 am