Boost C++ Libraries Home Libraries People FAQ More

Next

Chapter 1. Boost.Bimap

Matias Capeletto

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Table of Contents

Preface
Introduction
One minute tutorial
The tutorial
Roadmap
Discovering the bimap framework
Controlling collection types
The collection of relations type
Differences with standard maps
Useful functions
Bimaps with user defined names
Unconstrained Sets
Additional information
Complete instantiation scheme
Bimap and Boost
Bimap and MultiIndex
Boost Libraries that work well with Boost.Bimap
Dependencies
Reference
Headers
Bimap Reference
set_of Reference
unordered_set_of Reference
list_of Reference
vector_of Reference
unconstrained_set_of Reference
Compiler specifics
Performance
Examples
Examples list
Simple Bimap
Mighty Bimap
MultiIndex to Bimap Path - Bidirectional Map
MultiIndex to Bimap Path - Hashed indices
Test suite
Future work
Release notes
Rationale
General Design
Additional Features
Code
The student and the mentor
History
The long path from Code Project to Boost
MultiIndex and Bimap
Acknowledgements

Description

boost.bimap.logo

Boost.Bimap is a bidirectional maps library for C++. With Boost.Bimap you can create associative containers in which both types can be used as key. A bimap<X,Y> can be thought of as a combination of a std::map<X,Y> and a std::map<Y,X>. The learning curve of bimap is almost flat if you know how to use standard containers. A great deal of effort has been put into mapping the naming scheme of the STL in Boost.Bimap. The library is designed to match the common STL containers.

Influences and Related Work

The design of Boost.Bimap interface follows the standard template library. It has been strongly influenced by Joaquin Lopez Muñoz's Boost.MultiIndex library (the heart of bimaps) and codeproject::bimap library.


Next