Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/doc Modified Files: buckets.qbk comparison.qbk hash_equality.qbk intro.qbk rationale.qbk ref.xml unordered.qbk Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: hash_equality.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/hash_equality.qbk,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- hash_equality.qbk 10 Jan 2007 00:07:33 -0000 1.3 +++ hash_equality.qbk 18 Mar 2007 20:00:57 -0000 1.4 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 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) ] + [section:hash_equality Equality Predicates and Hash Functions] [/TODO: A better introduction to hash functions?] Index: ref.xml =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/ref.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ref.xml 6 Aug 2006 20:44:47 -0000 1.5 +++ ref.xml 18 Mar 2007 20:00:57 -0000 1.6 @@ -1,3 +1,9 @@ +<!-- +Copyright Daniel James 2006-2007 +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) +--> + <library-reference> <!-- Header: <boost/unordered_set.hpp> Index: unordered.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/unordered.qbk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- unordered.qbk 6 Aug 2006 20:52:33 -0000 1.6 +++ unordered.qbk 18 Mar 2007 20:00:57 -0000 1.7 @@ -1,7 +1,11 @@ +[/ Copyright 2006-2007 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) ] + [library Unordered Associative Containers [quickbook 1.3] [authors [Maitin-Shepard, Jeremy B.], [James, Daniel]] - [copyright 2005 2006 Daniel James] + [copyright 2005 2007 Daniel James] [purpose std::tr1 compliant hash containers] [id unordered] [dirname unordered] Index: comparison.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/comparison.qbk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- comparison.qbk 31 Oct 2006 22:15:47 -0000 1.6 +++ comparison.qbk 18 Mar 2007 20:00:57 -0000 1.7 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 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) ] + [section:comparison Comparison with Associative Containers] [table Interface differences. @@ -10,7 +14,10 @@ ] [ [`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()`.] Index: rationale.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/rationale.qbk,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- rationale.qbk 31 Oct 2006 22:15:47 -0000 1.8 +++ rationale.qbk 18 Mar 2007 20:00:57 -0000 1.9 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 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) ] + [def __wang__ [@http://www.concentric.net/~Ttwang/tech/inthash.htm Thomas Wang's article on integer hash functions]] @@ -96,14 +100,11 @@ [h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431 431. Swapping containers with unequal allocators]] -In a fit of probably unwise enthusiasm, I implemented all the three versions -with a macro (BOOST_UNORDERED_SWAP_METHOD) to pick which one is used. As -suggested by Howard Hinnant, I set option 3 as the default. I'll probably -remove the alternative implementations before review. +I'm following Howard Hinnant's advice and implement option 3. There is currently a further issue - if the allocator's swap does throw there's no guarantee what state the allocators will be in. The only solution seems to -be to double buffer the allocators. +be to double buffer the allocators. But I'm assuming that it won't throw for now. [h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518 518. Are insert and erase stable for unordered_multiset and unordered_multimap?]] Index: buckets.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/buckets.qbk,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- buckets.qbk 1 Jul 2006 22:33:29 -0000 1.4 +++ buckets.qbk 18 Mar 2007 20:00:57 -0000 1.5 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 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) ] + [section:buckets The Data Structure] The containers are made up of a number of 'buckets', each of which can contain @@ -6,7 +10,7 @@ `B`, `C`, `D` and `E` (this is just for illustration, in practise containers will have more buckets). -[$../diagrams/buckets.png] +[$../../libs/unordered/doc/diagrams/buckets.png] In order to decide which bucket to place an element in, the container applies `Hash` to the element's key (for `unordered_set` and `unordered_multiset` the Index: intro.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/intro.qbk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- intro.qbk 1 Jul 2006 22:33:29 -0000 1.6 +++ intro.qbk 18 Mar 2007 20:00:57 -0000 1.7 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 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) ] + [def __tr1__ [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf C++ Standard Library Technical Report]] |