[libcxx-commits] [PATCH] D60246: [libc++] Simple contains for associative containers

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 3 20:53:16 PDT 2019


jloser created this revision.
jloser added reviewers: mclow.lists, ldionne, EricWF.
jloser added a project: libc++.
Herald added subscribers: dexonsmith, christof.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0458r2.html

This patch adds partial support for p0458, adding a `contains` member function
for associative containers. This feature allows users to query whether
a key type exists in an associative container.

Note:

- This patch does not add support for heterogeneous key overloads for `contains`. A future patch will follow for support this. Currently, the unordered associative containers do not yet have a notion of transparent lookups.
- This patch does not add support for `contains` with precomputed hashes. A future patch will follow for support for this.


Repository:
  rCXX libc++

https://reviews.llvm.org/D60246

Files:
  libcxx/include/unordered_map
  libcxx/include/unordered_set
  libcxx/test/std/containers/unord/unord.map/contains.pass.cpp
  libcxx/test/std/containers/unord/unord.multimap/contains.pass.cpp
  libcxx/test/std/containers/unord/unord.multiset/contains.pass.cpp
  libcxx/test/std/containers/unord/unord.set/contains.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60246.193654.patch
Type: text/x-patch
Size: 7960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190404/aba40fd2/attachment-0001.bin>


More information about the libcxx-commits mailing list