[libcxx-commits] [PATCH] D59886: Heterogeneous lookup for unordered containers (P0919R3)
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 19 09:43:35 PDT 2019
mclow.lists added a comment.
Here's a few nits; I'm still working on the code.
================
Comment at: include/unordered_map:176
const_iterator find(const key_type& k) const;
+ template <class K> iterator find(const K& k);
+ template <class K> const_iterator find(const K& k) const;
----------------
These all need a comment `// C++20`
================
Comment at: include/unordered_map:363
size_type count(const key_type& k) const;
+ template <class K> size_type count(const K& k) const;
pair<iterator, iterator> equal_range(const key_type& k);
----------------
`// C++20` comments here too
================
Comment at: include/unordered_map:428
+#define __cpp_lib_generic_unordered_lookup
+
----------------
zoecarver wrote:
> Also not sure if this is where this should go.
This should go in `<version>`. Then there's a tool to regenerate the version tests.
================
Comment at: test/std/containers/key_equal.fail.cpp:27
+{
+ // expected-error {{type 'const custom_hash' does not provide a call operator}}
+ // expected-error {{static_assert failed due to requirement '__check_hash_requirements<int, custom_hash>::value' "the specified hash does not meet the Hash requirements"}}
----------------
zoecarver wrote:
> These comments describe errors in other files. What line should they go on and how should they be formatted?
You just say `expected-error@<filename>:<line number>` ; and you can use `*` for the line number (in fact, you should).
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59886/new/
https://reviews.llvm.org/D59886
More information about the libcxx-commits
mailing list