public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François Dumont" <frs.dumont@gmail.com>
To: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Add unordered containers heterogeneous lookup
Date: Mon, 25 Jan 2021 19:21:44 +0100	[thread overview]
Message-ID: <93b79981-d06f-99e4-5a81-7750f2f31cd1@gmail.com> (raw)
In-Reply-To: <7ec87f53-858e-c4b6-8f71-f48a0bc7dc19@gmail.com>

I think I never got a clear answer that we'll wait for stage 1 to 
consider this patch so here is a ping.


On 01/12/20 8:19 am, François Dumont wrote:
> Let me know if I need to reference a specific paper or any other 
> Standard reference here. Maybe P1690R1 I used here ?
>
> I tried to allow the same partition trick you can have on ordered 
> containers (see Partition in tests) even if here elements are not 
> ordered so I aren't sure there can be any usage of it.
>
>     libstdc++: Add unordered containers heterogeneous lookup
>
>     Add unordered containers heterogeneous lookup member functions 
> find, count, contains and
>     equal_range in C++20. Those members are considered for overload 
> resolution only if hash and
>     equal functors used to instantiate the container have a nested 
> is_transparent type.
>
>     libstdc++-v3/ChangeLog:
>
>             * include/bits/stl_tree.h
>             (__has_is_transparent, __has_is_transparent_t): Move...
>             * include/bits/stl_function.h: ...here.
>             * include/bits/hashtable_policy.h 
> (_Hash_code_base<>::_M_hash_code):
>             Use template key type.
>             (_Hashtable_base<>::_M_equals): Likewise.
>             * include/bits/hashtable.h (_Hashtable<>::_M_find_tr, 
> _Hashtable<>::_M_count_tr,
>             _Hashtable<>::_M_equal_range_tr): New member function 
> templates to perform
>             heterogeneous lookup.
>             (_Hashtable<>::_M_find_before_node): Use template key type.
>             (_Hashtable<>::_M_find_node): Likewise.
>             * include/bits/unordered_map.h (unordered_map::find<>, 
> unordered_map::count<>,
>             unordered_map::contains<>, unordered_map::equal_range<>): 
> New member function
>             templates to perform heterogeneous lookup.
>             (unordered_multimap::find<>, unordered_multimap::count<>,
>             unordered_multimap::contains<>, 
> unordered_multimap::equal_range<>): Likewise.
>             * include/bits/unordered_set.h (unordered_set::find<>, 
> unordered_set::count<>,
>             unordered_set::contains<>, unordered_set::equal_range<>): 
> Likewise.
>             (unordered_multiset::find<>, unordered_multiset::count<>,
>             unordered_multiset::contains<>, 
> unordered_multiset::equal_range<>): Likewise.
>             * include/debug/unordered_map
>             (unordered_map::find<>, unordered_map::equal_range<>): 
> Likewise.
>             (unordered_multimap::find<>, 
> unordered_multimap::equal_range<>): Likewise.
>             * include/debug/unordered_set
>             (unordered_set::find<>, unordered_set::equal_range<>): 
> Likewise.
>             (unordered_multiset::find<>, 
> unordered_multiset::equal_range<>): Likewise.
>             * testsuite/23_containers/unordered_map/operations/1.cc: 
> New test.
>             * 
> testsuite/23_containers/unordered_multimap/operations/1.cc: New test.
>             * 
> testsuite/23_containers/unordered_multiset/operations/1.cc: New test.
>             * testsuite/23_containers/unordered_set/operations/1.cc: 
> New test.
>
> Tested under Linux x86_64 normal and debug modes.
>
> François
>


  reply	other threads:[~2021-01-25 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  7:19 François Dumont
2021-01-25 18:21 ` François Dumont [this message]
2021-02-03 11:23   ` Jonathan Wakely
2021-02-03 11:24     ` Jonathan Wakely
2021-02-04 20:20       ` François Dumont
2021-02-09 11:18         ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93b79981-d06f-99e4-5a81-7750f2f31cd1@gmail.com \
    --to=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).