From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id CF40E385781A; Mon, 25 Jan 2021 18:21:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CF40E385781A Received: by mail-wr1-x430.google.com with SMTP id b5so13962319wrr.10; Mon, 25 Jan 2021 10:21:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=YI8Cz3jkzMwk+gO89FIf0xYv1SXLygcbIYP/qdS5ewk=; b=KNuak4quCmZ7cArCMuF/Gdl/fwrH6SQrnKs/Hmo+FB/Ubg25wTRpjm+XhszCigg+TR 7DdPnxuK0T1o3Dq8d0j4XxSaluAQzT7D34tZV06GsSVqlAOk/PeFOLvatNn5X0IlTqaQ 4Z6FyIt2/qzhl6ycoT5PV7tp0mUzVpzxDLx6gDQDQuFLiucwC+cpoAuwXwYaMrDeEcVW uJBHIJZTBipQYhiw/9W+JXv1Pi686zdKav1bsPzrS969NW1IpiSuCovi26ceWWFw4tuy pREYR/X0LWB7VQvuYw8RwRdkBuH2XvTXlrkABqeT1LnfH1yF/QdEevmJoKmsALjWrEbN cxog== X-Gm-Message-State: AOAM531Svby9aCgY8Hz8L4Ks647m2q2GIqr5kyvIVKLA1SNyhO+xMH8/ MTlFtT0BH23Yth1+u1IiTJpoB4R3/dQ= X-Google-Smtp-Source: ABdhPJx2zVOovFVuHaK9wRIoz5koDuB9OXUKnCoMFiYcak2KHnrORdElTzCaAMJobvGGOfbR4bncGg== X-Received: by 2002:a5d:452f:: with SMTP id j15mr2439884wra.298.1611598906604; Mon, 25 Jan 2021 10:21:46 -0800 (PST) Received: from [10.34.5.82] ([109.190.253.15]) by smtp.googlemail.com with ESMTPSA id e4sm11520776wrw.96.2021.01.25.10.21.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jan 2021 10:21:45 -0800 (PST) Subject: Re: [PATCH] Add unordered containers heterogeneous lookup From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= To: "libstdc++@gcc.gnu.org" , gcc-patches References: <7ec87f53-858e-c4b6-8f71-f48a0bc7dc19@gmail.com> Message-ID: <93b79981-d06f-99e4-5a81-7750f2f31cd1@gmail.com> Date: Mon, 25 Jan 2021 19:21:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <7ec87f53-858e-c4b6-8f71-f48a0bc7dc19@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2021 18:21:50 -0000 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 >