Update the unordered containers' documentation and notes for the most recent papers from the C++ working group - will probably have to do this again in a few weeks.

[SVN r39951]
This commit is contained in:
Daniel James
2007-10-11 23:51:29 +00:00
parent 50c629dcb0
commit 1b200a6194
4 changed files with 27 additions and 12 deletions

View File

@ -3,13 +3,13 @@
/ 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
[@www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf
C++ Standard Library Technical Report]]
[def __boost-tr1__
[@http://www.boost.org/doc/html/boost_tr1.html
Boost.TR1]]
[def __draft__
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf
[@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2369.pdf
Working Draft of the C++ Standard]]
[def __hash-table__ [@http://en.wikipedia.org/wiki/Hash_table
hash table]]
@ -34,8 +34,10 @@ and a hash function for the key.
So the __tr1__ introduced the unordered associative containers, which are
implemented using hash tables, and they have now been added to the __draft__.
This library supplies a standards compliant implementation that is proposed for
addition to boost. If accepted they should also be added to __boost-tr1__.
This library supplies an almost complete implementation of the specification in
the __draft__, (it doesn't support `emplace` yet, see the [link
unordered.rationale.future_developments Implementation Rationale] section for more
details). If accepted the containers should also be added to __boost-tr1__.
`unordered_set` and `unordered_multiset` are defined in the header
<[headerref boost/unordered_set.hpp]>

View File

@ -5,6 +5,12 @@
[def __wang__
[@http://www.concentric.net/~Ttwang/tech/inthash.htm
Thomas Wang's article on integer hash functions]]
[def __n2345__
[@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2345.pdf
the August 2008 version of the working draft standard]]
[def __n2369__
[@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2369.pdf
the August 2008 version of the working draft standard]]
[section:rationale Implementation Rationale]
@ -98,7 +104,7 @@ So, this implementation uses a prime number for the hash table size.
This proposal suggests removing the `construct`, `destroy` and `address`
member functions - all of which Boost.Unordered calls. It's near trivial
to replace the calls with the appropriate code - and will simplify the
implementation.
implementation, as well as make supporting `emplace` easier.
[h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431
431. Swapping containers with unequal allocators]]
@ -120,4 +126,14 @@ should probably change it to a slow swap.
The current proposal is that insert, erase and rehash are stable - so they are here.
[h2 Future Developments]
[h3 Support for `emplace`]
In __n2369__ a new member function, `emplace` was added to the containers to
allow placement insert, as described in __n2345__. To fully implement this
`std::forward` is required, along with new functions in `std::allocator` and
new constructors in `std::pair`. But partial support is possible - especially
if I don't use the `construct` member of allocators.
[endsect]

View File

@ -34,7 +34,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf">the working draft of the C++ standard [n2009].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2369.pdf">the working draft of the C++ standard [n2369].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@ -617,7 +617,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf">the working draft of the C++ standard [n2009].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2369.pdf">the working draft of the C++ standard [n2369].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@ -1209,7 +1209,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf">the working draft of the C++ standard [n2009].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2369.pdf">the working draft of the C++ standard [n2369].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@ -1820,7 +1820,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf">the working draft of the C++ standard [n2009].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2369.pdf">the working draft of the C++ standard [n2369].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">

View File

@ -876,9 +876,6 @@ namespace boost {
// Erase
//
// Return type of erase(const_iterator):
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1753.html#130
//
// no throw
iterator_base erase(iterator_base r)