[PATCH] D117858: [docs] Refine the description in Set-Like and Map-Like container options.

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 15:34:23 PST 2022


dexonsmith added a comment.

> 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.

Not sure repeating the double-quotes makes sense; the previous sentence references to SGI and C++ TR1, both of which did have these containers. It sounds like you're using quotes because it's not a real thing, but I'm not sure that applies here.

That said, maybe it's a good idea to drop the `hash_*` references entirely. Not sure they're relevant anymore.



================
Comment at: llvm/docs/ProgrammersManual.rst:2201-2205
 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.
----------------
See the proposed edit, which:
- Drops the references to C++ TR1 and SGI and `hash_set`.
- Drops the worry about portability (this was a problem with `hash_set`, but `std::unordered_set` has worked portably since LLVM started depending on C++11).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117858/new/

https://reviews.llvm.org/D117858



More information about the llvm-commits mailing list