From 7aeaa0f669e61a8c8f256ec6dcbd21bb8bab4214 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 10 Feb 2006 00:26:09 +0000 Subject: [PATCH] Update the hash documentation to reflect the reorganisation of the headers (still need to write a 'what's changed' page to explain the changes). [SVN r32800] --- hash/doc/hash.qbk | 124 ++++++---------------------------------------- 1 file changed, 15 insertions(+), 109 deletions(-) diff --git a/hash/doc/hash.qbk b/hash/doc/hash.qbk index 47a551d..591af65 100644 --- a/hash/doc/hash.qbk +++ b/hash/doc/hash.qbk @@ -1,4 +1,5 @@ [library Boost.Functional/Hash + [quickbook 1.3] [authors [James, Daniel]] [copyright 2005 Daniel James] [purpose A TR1 hash function object that can be extended to hash user @@ -9,15 +10,10 @@ [license 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 - ) + [@http://www.boost.org/LICENSE_1_0.txt] ] ] -[/ QuickBook Document version 1.0 ] -[/ Feb 8, 2005 ] - [def __note__ [$images/note.png]] [def __alert__ [$images/alert.png]] [def __tip__ [$images/tip.png]] @@ -83,7 +79,7 @@ __boost_hash, just use an extra template parameter: To use __boost_hash directly, create an instance and call it as a function: - #include + #include int main() { @@ -92,21 +88,6 @@ To use __boost_hash directly, create an instance and call it as a function: std::size_t h = string_hash("Hash me"); } -If you wish to make use of the extensions, you will need to include the -appropriate header (see the -[link hash.reference.specification reference documentation] for the full list). - - #include - - int main() - { - __boost_hash > pair_hash; - - std::size_t h = pair_hash(std::make_pair(1, 2)); - } - -Or alternatively, include `` for the full library. - For an example of generic use, here is a function to generate a vector containing the hashes of the elements of a container: @@ -362,7 +343,7 @@ support built in arrays so this shouldn't be a problem in most cases. On Visual C++ versions 6.5 and 7.0, function pointers aren't currently supported. -`boost::hash_value(long double)` on GCC on Solaris appears to treat +When using GCC on Solaris, `boost::hash_value(long double)` treats `long double`s as doubles - so the hash function doesn't take into account the full range of values. @@ -383,13 +364,9 @@ but there you go. ]
- Includes all the following headers. -
-
Defines boost::hash, - the implementation for built in types and - std::string and customisation functions. + and helper functions. @@ -724,14 +701,11 @@ for(; first != last; ++first) hash_range(val.begin(), val.end()) - -
-
- - Hash implementation for std::pair. - - + +