Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2226218/?format=api
{ "id": 2226218, "url": "http://patchwork.ozlabs.org/api/patches/2226218/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhub8n5f78.gcc.gcc-TEST.redi.15.1.10@forge-stage.sourceware.org/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<bmm.hhub8n5f78.gcc.gcc-TEST.redi.15.1.10@forge-stage.sourceware.org>", "list_archive_url": null, "date": "2026-04-22T10:25:19", "name": "[v1,10/12] libstdc++: Remove _Hashtable_base::_S_equals", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c538ae06aba17c1a8674a1571b5eedc673e88e4a", "submitter": { "id": 93210, "url": "http://patchwork.ozlabs.org/api/people/93210/?format=api", "name": "Jonathan Wakely via Sourceware Forge", "email": "forge-bot+redi@forge-stage.sourceware.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhub8n5f78.gcc.gcc-TEST.redi.15.1.10@forge-stage.sourceware.org/mbox/", "series": [ { "id": 500966, "url": "http://patchwork.ozlabs.org/api/series/500966/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500966", "date": "2026-04-22T10:25:11", "name": "WIP: libstdc++: Refactor hash table code", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500966/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226218/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226218/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org", "sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0wmX4plqz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 20:43:08 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 7F4CD4BB58F7\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 10:43:06 +0000 (GMT)", "from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 206154BBCDCD\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:26:18 +0000 (GMT)", "from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id 3E0E7405A9\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:26:15 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 7F4CD4BB58F7", "OpenDKIM Filter v2.11.0 sourceware.org 206154BBCDCD" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 206154BBCDCD", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 206154BBCDCD", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776853578; cv=none;\n b=cxG5Qs16MtdfNELaDEd9n1OUF0+2+HWd1xae05X/E6j2rAm7qmSE2B1LmLTglhGstX4niE2/JQR/25oLHBLlfI1M60OjbhTu9CYImkmPjavVbcrq4+A2c8xflfyWoX8tvOEH0rv9TZgAStDOVthm/IKZYMgx4LCIMbNYh15pRAs=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776853578; c=relaxed/simple;\n bh=vX9gSeDfOerCKFXUhZGGLS7jev2++wuOhgmMJQPFb8g=;\n h=From:Date:Subject:To:Message-ID;\n b=NcagIhNq26/xp9WMTrALTnRIcO9QXD0/hIUC3i4uPWVwELORbVlIk3PX7BLXGaZQyX5k/joNcMP6UVe//NQNNPRZOqKBYzIhPpJnCsrtCqGdpaDtnMkIJ+k0b7Whapgc+kQ/BINuHggfuoB1JPD062IriM9TwJ04baSz9dPvSYA=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "From": "Jonathan Wakely via Sourceware Forge\n <forge-bot+redi@forge-stage.sourceware.org>", "Date": "Wed, 22 Apr 2026 10:25:19 +0000", "Subject": "[PATCH v1 10/12] libstdc++: Remove _Hashtable_base::_S_equals", "To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>", "Message-ID": "\n <bmm.hhub8n5f78.gcc.gcc-TEST.redi.15.1.10@forge-stage.sourceware.org>", "X-Mailer": "batrachomyomachia", "X-Requested-Reviewer": "fdumont", "X-Pull-Request-Organization": "gcc", "X-Pull-Request-Repository": "gcc-TEST", "X-Pull-Request": "https://forge.sourceware.org/gcc/gcc-TEST/pulls/15", "References": "\n <bmm.hhub8n5f78.gcc.gcc-TEST.redi.15.1.0@forge-stage.sourceware.org>", "In-Reply-To": "\n <bmm.hhub8n5f78.gcc.gcc-TEST.redi.15.1.0@forge-stage.sourceware.org>", "X-Patch-URL": "\n https://forge.sourceware.org/redi/gcc/commit/0defc8e0208309ced8e592a9c7dd50e0f801f8aa", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Reply-To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>, redi@gcc.gnu.org", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "From: Jonathan Wakely <jwakely@redhat.com>\n\nThis removes the overloaded _S_equals and _S_node_equals functions,\nreplacing them with 'if constexpr' in the handful of places they're\nused.\n\nlibstdc++-v3/ChangeLog:\n\n\t* include/bits/hashtable_policy.h (_Hashtable_base::_S_equals):\n\tRemove.\n\t(_Hashtable_base::_S_node_equals): Remove.\n\t(_Hashtable_base::_M_key_equals_tr): Fix inaccurate\n\tstatic_assert string.\n\t(_Hashtable_base::_M_equals, _Hashtable_base::_M_equals_tr): Use\n\t'if constexpr' instead of _S_equals.\n\t(_Hashtable_base::_M_node_equals): Use 'if constexpr' instead of\n\t_S_node_equals.\n---\n libstdc++-v3/include/bits/hashtable_policy.h | 48 ++++++++++----------\n 1 file changed, 24 insertions(+), 24 deletions(-)", "diff": "diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h\nindex c3d89a1101c6..ad0dfd55c3f1 100644\n--- a/libstdc++-v3/include/bits/hashtable_policy.h\n+++ b/libstdc++-v3/include/bits/hashtable_policy.h\n@@ -1487,24 +1487,6 @@ namespace __detail\n private:\n using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>;\n \n- static bool\n- _S_equals(__hash_code, const _Hash_node_code_cache<false>&)\n- { return true; }\n-\n- static bool\n- _S_node_equals(const _Hash_node_code_cache<false>&,\n-\t\t const _Hash_node_code_cache<false>&)\n- { return true; }\n-\n- static bool\n- _S_equals(__hash_code __c, const _Hash_node_code_cache<true>& __n)\n- { return __c == __n._M_hash_code; }\n-\n- static bool\n- _S_node_equals(const _Hash_node_code_cache<true>& __lhn,\n-\t\t const _Hash_node_code_cache<true>& __rhn)\n- { return __lhn._M_hash_code == __rhn._M_hash_code; }\n-\n protected:\n _Hashtable_base() = default;\n \n@@ -1531,31 +1513,49 @@ namespace __detail\n \t{\n \t static_assert(\n \t __is_invocable<const _Equal&, const _Kt&, const _Key&>{},\n-\t \"key equality predicate must be invocable with two arguments of \"\n-\t \"key type\");\n+\t \"key equality predicate must be invocable with the argument type \"\n+\t \"and the key type\");\n \t return _M_eq()(__k, _ExtractKey{}(__n._M_v()));\n \t}\n \n+#pragma GCC diagnostic push\n+#pragma GCC diagnostic ignored \"-Wc++17-extensions\" // if constexpr\n bool\n _M_equals(const _Key& __k, __hash_code __c,\n \t\tconst _Hash_node_value<_Value, __hash_cached::value>& __n) const\n- { return _S_equals(__c, __n) && _M_key_equals(__k, __n); }\n+ {\n+\tif constexpr (__hash_cached::value)\n+\t if (__c != __n._M_hash_code)\n+\t return false;\n+\n+\treturn _M_key_equals(__k, __n);\n+ }\n \n template<typename _Kt>\n \tbool\n \t_M_equals_tr(const _Kt& __k, __hash_code __c,\n \t\t const _Hash_node_value<_Value,\n \t\t\t\t\t __hash_cached::value>& __n) const\n-\t{ return _S_equals(__c, __n) && _M_key_equals_tr(__k, __n); }\n+\t{\n+\t if constexpr (__hash_cached::value)\n+\t if (__c != __n._M_hash_code)\n+\t return false;\n+\n+\t return _M_key_equals_tr(__k, __n);\n+\t}\n \n bool\n _M_node_equals(\n \tconst _Hash_node_value<_Value, __hash_cached::value>& __lhn,\n \tconst _Hash_node_value<_Value, __hash_cached::value>& __rhn) const\n {\n-\treturn _S_node_equals(__lhn, __rhn)\n-\t && _M_key_equals(_ExtractKey{}(__lhn._M_v()), __rhn);\n+\tif constexpr (__hash_cached::value)\n+\t if (__lhn._M_hash_code != __rhn._M_hash_code)\n+\t return false;\n+\n+\treturn _M_key_equals(_ExtractKey{}(__lhn._M_v()), __rhn);\n }\n+#pragma GCC diagnostic pop\n \n void\n _M_swap(_Hashtable_base& __x)\n", "prefixes": [ "v1", "10/12" ] }