[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
Fri Jan 21 00:24:09 PST 2022


HsiangKai created this revision.
HsiangKai added a reviewer: dexonsmith.
HsiangKai requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

There is no container named hash_set or hash_maa in C++ STL. We should
add double quotes around the word just like previous sentence.

In "Other Map-Like Container Options" section, it uses hash_set and
unordered_set. It should be copied from "Other Set-Like Container
Options" section. I corrected them as "hash_map" and unordered_map.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117858

Files:
  llvm/docs/ProgrammersManual.rst


Index: llvm/docs/ProgrammersManual.rst
===================================================================
--- llvm/docs/ProgrammersManual.rst
+++ llvm/docs/ProgrammersManual.rst
@@ -2200,8 +2200,9 @@
 
 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.
+never use "hash_set" like containers, e.g., unordered_set, because they are
+generally very expensive (each insertion requires a malloc) and very
+non-portable.
 
 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
@@ -2391,8 +2392,9 @@
 
 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.
+never use "hash_map" like containers, e.g., unordered_map, because they are
+generally very expensive (each insertion requires a malloc) and very
+non-portable.
 
 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.401881.patch
Type: text/x-patch
Size: 1465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220121/d2b3222b/attachment.bin>


More information about the llvm-commits mailing list