diff --git a/doc/comparison.qbk b/doc/comparison.qbk index 7c94da57..f81a2392 100644 --- a/doc/comparison.qbk +++ b/doc/comparison.qbk @@ -14,7 +14,9 @@ ] [ [`Compare` exposed by member typedef `key_compare`, accessed by member function `key_comp()`] - [`Hash` exposed by member typedef `hasher`, accessed by member function `hash_function()`.\n`Pred` by member typedef `key_equal` and member function `key_eq()`.] + [`Hash` exposed by member typedef `hasher`, accessed by member function `hash_function()`. + + `Pred` by member typedef `key_equal` and member function `key_eq()`.] ] [ [Member typedef `value_compare` supplies an ordering comparison for member elements, accessed by member function `value_comp()`.] diff --git a/doc/hash_equality.qbk b/doc/hash_equality.qbk index 509ed783..86a46917 100644 --- a/doc/hash_equality.qbk +++ b/doc/hash_equality.qbk @@ -32,37 +32,9 @@ Alternatively, you might wish to use a different equality function. If so, make sure you use a hash function that matches it. So to implement a case-insensitive dictionary: - struct iequal_to - : std::binary_function - { - bool operator()(std::string const& x, - std::string const& y) const - { - return boost::algorithm::iequals(x, y); - } - }; - - struct ihash - : std::unary_function - { - bool operator()(std::string const& x) const - { - std::size_t seed = 0; - - for(std::string::const_iterator it = x.begin(); - it != x.end(); ++it) - { - boost::hash_combine(seed, std::toupper(*it)); - } - - return seed; - } - }; - - struct word_info; - - boost::unordered_map - idictionary; +[import src_code/insensitive.cpp] +[case_insensitive_functions] +[case_insensitive_dictionary] A more generic version is available at: [@../../libs/unordered/examples/case_insensitive.hpp /libs/unordered/examples/case_insensitive.hpp] diff --git a/doc/unordered.qbk b/doc/unordered.qbk index 8f8c4def..c8a020ed 100644 --- a/doc/unordered.qbk +++ b/doc/unordered.qbk @@ -3,7 +3,7 @@ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ] [library Unordered Associative Containers - [quickbook 1.3] + [quickbook 1.4] [authors [Maitin-Shepard, Jeremy B.], [James, Daniel]] [copyright 2005 2007 Daniel James] [purpose std::tr1 compliant hash containers]