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.
PrevUpHomeNext

Chapter 5. Boost.Functional/Hash

Daniel James

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

Introduction
Tutorial
Extending boost::hash for a custom data type
Combining hash values
Portability
Reference
Links
Acknowledgements

Introduction

boost::hash is an implementation of the hash function object specified by the Technical Report. It is intended for use as the default hash function for unordered associative containers, and the Boost Multi-Index Containers Library's hash indexes.

As it is compliant with the Technical Report, it will work with:

  • integers
  • floats
  • pointers
  • strings

It also implements the extension proposed by Peter Dimov in issue 6.18 of the Library Extension Technical Report Issues List, this adds support for:

  • arrays
  • std::pair
  • the standard containers.
  • extending boost::hash for custom types.

Last revised: December 03, 2005 at 16:18:04 GMT


PrevUpHomeNext