[PATCH] D117858: [docs] Refine the description in Set-Like and Map-Like container options.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 02:09:53 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG48f763edb471: [docs] Refine the description in Set-Like and Map-Like container options. (authored by HsiangKai).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117858/new/
https://reviews.llvm.org/D117858
Files:
llvm/docs/ProgrammersManual.rst
Index: llvm/docs/ProgrammersManual.rst
===================================================================
--- llvm/docs/ProgrammersManual.rst
+++ llvm/docs/ProgrammersManual.rst
@@ -2198,10 +2198,9 @@
Other Set-Like Container Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The STL provides several other options, such as std::multiset and the various
-"hash_set" like containers (whether from C++ TR1 or from the SGI library). We
-never use hash_set and unordered_set because they are generally very expensive
-(each insertion requires a malloc) and very non-portable.
+The STL provides several other options, such as std::multiset and
+std::unordered_set. We never use containers like unordered_set because
+they are generally very expensive (each insertion requires a malloc).
std::multiset is useful if you're not interested in elimination of duplicates,
but has all the drawbacks of :ref:`std::set <dss_set>`. A sorted vector
@@ -2389,10 +2388,9 @@
Other Map-Like Container Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The STL provides several other options, such as std::multimap and the various
-"hash_map" like containers (whether from C++ TR1 or from the SGI library). We
-never use hash_set and unordered_set because they are generally very expensive
-(each insertion requires a malloc) and very non-portable.
+The STL provides several other options, such as std::multimap and
+std::unordered_map. We never use containers like unordered_map because
+they are generally very expensive (each insertion requires a malloc).
std::multimap is useful if you want to map a key to multiple values, but has all
the drawbacks of std::map. A sorted vector or some other approach is almost
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117858.402803.patch
Type: text/x-patch
Size: 1701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220125/69836f51/attachment.bin>
More information about the llvm-commits
mailing list