mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 11:57:15 +02:00
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:
@@ -3,13 +3,13 @@
|
|||||||
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ]
|
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ]
|
||||||
|
|
||||||
[def __tr1__
|
[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]]
|
C++ Standard Library Technical Report]]
|
||||||
[def __boost-tr1__
|
[def __boost-tr1__
|
||||||
[@http://www.boost.org/doc/html/boost_tr1.html
|
[@http://www.boost.org/doc/html/boost_tr1.html
|
||||||
Boost.TR1]]
|
Boost.TR1]]
|
||||||
[def __draft__
|
[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]]
|
Working Draft of the C++ Standard]]
|
||||||
[def __hash-table__ [@http://en.wikipedia.org/wiki/Hash_table
|
[def __hash-table__ [@http://en.wikipedia.org/wiki/Hash_table
|
||||||
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
|
So the __tr1__ introduced the unordered associative containers, which are
|
||||||
implemented using hash tables, and they have now been added to the __draft__.
|
implemented using hash tables, and they have now been added to the __draft__.
|
||||||
|
|
||||||
This library supplies a standards compliant implementation that is proposed for
|
This library supplies an almost complete implementation of the specification in
|
||||||
addition to boost. If accepted they should also be added to __boost-tr1__.
|
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
|
`unordered_set` and `unordered_multiset` are defined in the header
|
||||||
<[headerref boost/unordered_set.hpp]>
|
<[headerref boost/unordered_set.hpp]>
|
||||||
|
@@ -5,6 +5,12 @@
|
|||||||
[def __wang__
|
[def __wang__
|
||||||
[@http://www.concentric.net/~Ttwang/tech/inthash.htm
|
[@http://www.concentric.net/~Ttwang/tech/inthash.htm
|
||||||
Thomas Wang's article on integer hash functions]]
|
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]
|
[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`
|
This proposal suggests removing the `construct`, `destroy` and `address`
|
||||||
member functions - all of which Boost.Unordered calls. It's near trivial
|
member functions - all of which Boost.Unordered calls. It's near trivial
|
||||||
to replace the calls with the appropriate code - and will simplify the
|
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
|
[h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431
|
||||||
431. Swapping containers with unequal allocators]]
|
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.
|
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]
|
[endsect]
|
||||||
|
@@ -34,7 +34,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
</purpose>
|
</purpose>
|
||||||
<description>
|
<description>
|
||||||
<para>For the normative reference see chapter 23 of
|
<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>
|
<para><emphasis role="bold">Template Parameters</emphasis>
|
||||||
<informaltable>
|
<informaltable>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
@@ -617,7 +617,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
</purpose>
|
</purpose>
|
||||||
<description>
|
<description>
|
||||||
<para>For the normative reference see chapter 23 of
|
<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>
|
<para><emphasis role="bold">Template Parameters</emphasis>
|
||||||
<informaltable>
|
<informaltable>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
@@ -1209,7 +1209,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
</purpose>
|
</purpose>
|
||||||
<description>
|
<description>
|
||||||
<para>For the normative reference see chapter 23 of
|
<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>
|
<para><emphasis role="bold">Template Parameters</emphasis>
|
||||||
<informaltable>
|
<informaltable>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
@@ -1820,7 +1820,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
</purpose>
|
</purpose>
|
||||||
<description>
|
<description>
|
||||||
<para>For the normative reference see chapter 23 of
|
<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>
|
<para><emphasis role="bold">Template Parameters</emphasis>
|
||||||
<informaltable>
|
<informaltable>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
|
@@ -876,9 +876,6 @@ namespace boost {
|
|||||||
|
|
||||||
// Erase
|
// Erase
|
||||||
//
|
//
|
||||||
// Return type of erase(const_iterator):
|
|
||||||
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1753.html#130
|
|
||||||
//
|
|
||||||
// no throw
|
// no throw
|
||||||
|
|
||||||
iterator_base erase(iterator_base r)
|
iterator_base erase(iterator_base r)
|
||||||
|
Reference in New Issue
Block a user