Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | |
| 2 | [/ Copyright 2005-2008 Daniel James. |
| 3 | / Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 4 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ] |
| 5 | |
| 6 | [section:intro Introduction] |
| 7 | |
| 8 | [def __tr1-full__ |
| 9 | [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf |
| 10 | Draft Technical Report on C++ Library Extensions]] |
| 11 | [def __tr1__ |
| 12 | [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf |
| 13 | TR1]] |
| 14 | [def __unordered__ [link unordered Boost.Unordered]] |
| 15 | [def __intrusive__ [link intrusive.unordered_set_unordered_multiset Boost.Intrusive]] |
| 16 | [def __multi-index__ [@boost:/libs/multi_index/doc/index.html |
| 17 | Boost Multi-Index Containers Library]] |
| 18 | [def __multi-index-short__ [@boost:/libs/multi_index/doc/index.html |
| 19 | Boost.MultiIndex]] |
| 20 | [def __bimap__ [@boost:/libs/bimap/index.html Boost.Bimap]] |
| 21 | [def __hash-function__ [@http://en.wikipedia.org/wiki/Hash_function hash function]] |
| 22 | [def __hash-table__ [@http://en.wikipedia.org/wiki/Hash_table hash table]] |
| 23 | |
| 24 | [classref boost::hash] is an implementation of the __hash-function__ object |
| 25 | specified by the __tr1-full__ (TR1). It is the default hash function for |
| 26 | __unordered__, __intrusive__'s unordered associative containers, and |
| 27 | __multi-index-short__'s hash indicies and __bimap__'s `unordered_set_of`. |
| 28 | |
| 29 | As it is compliant with __tr1__, it will work with: |
| 30 | |
| 31 | * integers |
| 32 | * floats |
| 33 | * pointers |
| 34 | * strings |
| 35 | |
| 36 | It also implements the extension proposed by Peter Dimov in issue 6.18 of the |
| 37 | __issues__ (page 63), this adds support for: |
| 38 | |
| 39 | * arrays |
| 40 | * `std::pair` |
| 41 | * the standard containers. |
| 42 | * extending [classref boost::hash] for custom types. |
| 43 | |
| 44 | [note |
| 45 | This hash function is designed to be used in containers based on |
| 46 | the STL and is not suitable as a general purpose hash function. |
| 47 | For more details see the [link hash.rationale rationale]. |
| 48 | ] |
| 49 | |
| 50 | |
| 51 | [endsect] |
| 52 | |