Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218970/?format=api
{ "id": 2218970, "url": "http://patchwork.ozlabs.org/api/patches/2218970/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260402073844.901461-1-jwakely@redhat.com/", "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": "<20260402073844.901461-1-jwakely@redhat.com>", "list_archive_url": null, "date": "2026-04-02T07:25:39", "name": "libstdc++: Use __cpp_lib_map_try_emplace feature test macro", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "acf98b86b4fe3b11549569918feb573681369ed2", "submitter": { "id": 48004, "url": "http://patchwork.ozlabs.org/api/people/48004/?format=api", "name": "Jonathan Wakely", "email": "jwakely@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260402073844.901461-1-jwakely@redhat.com/mbox/", "series": [ { "id": 498445, "url": "http://patchwork.ozlabs.org/api/series/498445/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498445", "date": "2026-04-02T07:25:39", "name": "libstdc++: Use __cpp_lib_map_try_emplace feature test macro", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498445/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218970/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218970/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\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=hmWiT0Q1;\n\tdkim-atps=neutral", "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;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=hmWiT0Q1", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124" ], "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 4fmYdq0GsMz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 18:39:27 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 05F564BA23E4\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 2 Apr 2026 07:39:25 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id BE9C74BA23D4\n for <gcc-patches@gcc.gnu.org>; Thu, 2 Apr 2026 07:38:50 +0000 (GMT)", "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-yCHXAN8oOYyEAT6Mpk1S3A-1; Thu,\n 02 Apr 2026 03:38:49 -0400", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 2EE3E19560A7; Thu, 2 Apr 2026 07:38:48 +0000 (UTC)", "from zen.kayari.org (unknown [10.44.32.41])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id B1FD11800766; Thu, 2 Apr 2026 07:38:46 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 05F564BA23E4", "OpenDKIM Filter v2.11.0 sourceware.org BE9C74BA23D4" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org BE9C74BA23D4", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org BE9C74BA23D4", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775115530; cv=none;\n b=PcinjbhtJH1xTtHVaZK1nbh6LyUAKLGyhLVmq16jD8R6oc/o1+RqgbX+BW/aWZSOr0HwwYgaiCwqeo0p3wTI4lrlddOj27dytFj1oLlLaPf7stTKCq3RX13z6ctzaAreYzPrfN89dDKaqqJJKWtQv+Sv3ybBbKtTXXtzh8rDkQA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775115530; c=relaxed/simple;\n bh=hJfj1f6P0BhYRYGRUmyeGZs3GSTStPCJTBvU+JK2EWs=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=GnThdnQtCgWJ3X1wPb2XR9svFQaH+XRReQuGs/IAMM7lRuxBMxTYyag8NnZybg8tnjdZ/q6V7J6UHLs2WMILLMcYdmsstAchBSy8MQqdRwl1vfs5TkLcY7KZ3Ww8gTG9zxCceMUET5CH8VkexnlRTicrRaiS6HljnJeu5xsceTU=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775115530;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=yH/9sqJcbQiFo0laG/uvJZOVIYEQtiKMA5MO7ZRkooc=;\n b=hmWiT0Q1GMVWA5bXzlEgYjn4diJ8fq34QXBEZSBrouz8kew3pWv8MwPj9+xOdDZ2Zu+L2Q\n 1lz6Tx5AF4iTbepxqZXXKKs6WeQMteZE1+8Y+5GD7i9jT7XprXUVRKeRCJSstfgIxvCp7Y\n zZLijmMv/kkZEza48dBb3JERXPHuJWA=", "X-MC-Unique": "yCHXAN8oOYyEAT6Mpk1S3A-1", "X-Mimecast-MFC-AGG-ID": "yCHXAN8oOYyEAT6Mpk1S3A_1775115528", "From": "Jonathan Wakely <jwakely@redhat.com>", "To": "gcc-patches@gcc.gnu.org,\n\tlibstdc++@gcc.gnu.org", "Subject": "[PATCH] libstdc++: Use __cpp_lib_map_try_emplace feature test macro", "Date": "Thu, 2 Apr 2026 08:25:39 +0100", "Message-ID": "<20260402073844.901461-1-jwakely@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "OpNC2iRfCaFVld5a9grESNfB9f1ItiODiipqvsBnlbg_1775115528", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "Check the relevant macro for insert_or_assign members, instead of just\nchecking the value of __cplusplus.\n\nAlso use Doxygen grouping to make docs for try_emplace apply to all\nthree overloads.\n\nlibstdc++-v3/ChangeLog:\n\n\t* include/bits/stl_map.h (map::try_emplace): Move #endif and use\n\tDoxygen's @{ to document all three overloads together.\n\t(map::insert_or_assign): Use relevant feature test macro.\n---\n\nTested x86_64-linux.\n\n libstdc++-v3/include/bits/stl_map.h | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)", "diff": "diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h\nindex 72a7392dbb77..1e119a95b5cd 100644\n--- a/libstdc++-v3/include/bits/stl_map.h\n+++ b/libstdc++-v3/include/bits/stl_map.h\n@@ -870,6 +870,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n * to the first is returned.\n *\n * Insertion requires logarithmic time (if the hint is not taken).\n+ *\n+ * @{\n */\n template <typename... _Args>\n \titerator\n@@ -906,7 +908,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n \t __i = iterator(__true_hint.first);\n \t return __i;\n \t}\n-#endif\n \n #ifdef __glibcxx_associative_heterogeneous_insertion // C++26\n template <__heterogeneous_tree_key<map> _Kt, typename ..._Args>\n@@ -927,6 +928,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n \t return __i;\n \t}\n #endif\n+ /// @}\n+#endif // __glibcxx_map_try_emplace\n \n /**\n * @brief Attempts to insert a std::pair into the %map.\n@@ -1074,7 +1077,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n \tinsert(_InputIterator __first, _InputIterator __last)\n \t{ _M_t._M_insert_range_unique(__first, __last); }\n \n-#if __cplusplus > 201402L\n+#ifdef __glibcxx_map_try_emplace // >= C++17 && HOSTED\n /**\n * @brief Attempts to insert or assign a std::pair into the %map.\n * @param __k Key to use for finding a possibly existing pair in\n@@ -1150,9 +1153,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n \t}\n #endif\n ///@}\n-#endif\n \n-#if __cplusplus > 201402L\n ///@{\n /**\n * @brief Attempts to insert or assign a std::pair into the %map.\n@@ -1238,7 +1239,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n \t}\n #endif\n ///@}\n-#endif\n+#endif // __glibcxx_map_try_emplace\n \n #if __cplusplus >= 201103L\n // _GLIBCXX_RESOLVE_LIB_DEFECTS\n", "prefixes": [] }