get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2226650/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2226650,
    "url": "http://patchwork.ozlabs.org/api/patches/2226650/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhunqjrqt2.gcc.gcc-TEST.redi.37.1.1@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.hhunqjrqt2.gcc.gcc-TEST.redi.37.1.1@forge-stage.sourceware.org>",
    "list_archive_url": null,
    "date": "2026-04-22T17:58:46",
    "name": "[v1,1/1] libstdc++: Add missing static_assert to std::expected<void,E>::value()&&",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6b6278bd4353cf2917d5a2f36582a9db65762e9c",
    "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.hhunqjrqt2.gcc.gcc-TEST.redi.37.1.1@forge-stage.sourceware.org/mbox/",
    "series": [
        {
            "id": 501058,
            "url": "http://patchwork.ozlabs.org/api/series/501058/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501058",
            "date": "2026-04-22T17:58:46",
            "name": "libstdc++: Add missing static_assert to std::expected<void,E>::value()&&",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501058/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226650/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226650/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 4g16Sk2T6Cz1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 04:00:05 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E8C3F4BB58F8\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 18:00:02 +0000 (GMT)",
            "from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id DDF754BB58F8\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 17:59:37 +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 B5DB342BFF\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 17:59:37 +0000 (UTC)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org E8C3F4BB58F8",
            "OpenDKIM Filter v2.11.0 sourceware.org DDF754BB58F8"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org DDF754BB58F8",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org DDF754BB58F8",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776880777; cv=none;\n b=RRWQDsgyJBTZY2Rj/FEnBuOcZv9fSQ/IGaVLU6wTyJUoPME275zEmlhcBoCvk3P/buBLuyoUXnF/tN5MGomuBDcVt4Kmf4ziMh8JwIFaBpRDyW7nSrPAD3Ibc8h3iBVY5eUp4wnv9Iwaf0NIvrPM0pxp+FU1ly9DP6cFSL5HNOk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776880777; c=relaxed/simple;\n bh=PolDstwKqkVPQ5fIKImSaofrh9ubvEPy0vkmn8kalwc=;\n h=From:Date:Subject:To:Message-ID;\n b=MHy78ydEDRBzUM3bCsrNCJdszoeu7J6NR2/FJtGejoBq010B9Q6H+o8C9fx0fFwEvPmrmZCJddsMvpAUH8ZRaTi3leFw+bkAhxGHkECHSNEP4/m19kopUOYu+xVh8eNo/DI4zqD7JWr0wJhGEvBVuTmYUTsi0gAxqBEASPS2UuQ=",
        "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 17:58:46 +0000",
        "Subject": "[PATCH v1 1/1] libstdc++: Add missing static_assert to\n std::expected<void,E>::value()&&",
        "To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>",
        "Message-ID": "\n <bmm.hhunqjrqt2.gcc.gcc-TEST.redi.37.1.1@forge-stage.sourceware.org>",
        "X-Mailer": "batrachomyomachia",
        "X-Pull-Request-Organization": "gcc",
        "X-Pull-Request-Repository": "gcc-TEST",
        "X-Pull-Request": "https://forge.sourceware.org/gcc/gcc-TEST/pulls/37",
        "References": "\n <bmm.hhunqjrqt2.gcc.gcc-TEST.redi.37.1.0@forge-stage.sourceware.org>",
        "In-Reply-To": "\n <bmm.hhunqjrqt2.gcc.gcc-TEST.redi.37.1.0@forge-stage.sourceware.org>",
        "X-Patch-URL": "\n https://forge.sourceware.org/redi/gcc/commit/62b2ee5099bb3aa807112e827ea224427071a2b2",
        "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\nThe r15-2326-gea435261ad58ea change missed a static_assert for\nis_move_constructible_v in expected<cv void, E>::value()&&. When\nexceptions are enabled, the program is ill-formed if the error type is\nnot move constructible, because we can't construct the\nstd::bad_expected_access. But when using -fno-exceptions, we never\nconstruct an exception, so don't need to copy/move the error value. So\nthat the same code compiles with/without exceptions enabled, we should\nenforce the requirement explicitly.\n\nAdd the static_assert, and a test that verifies the Mandates:\nconditions added by LWG 3843 and 3490 are enforced even with\n-fno-exceptions.\n\nlibstdc++-v3/ChangeLog:\n\n\t* include/std/expected (expected<cv void,E>::value()&&):\n\tAdd missing static_assert for LWG 3940.\n\t* testsuite/20_util/expected/lwg3843.cc: New test.\n---\n libstdc++-v3/include/std/expected             |  1 +\n .../testsuite/20_util/expected/lwg3843.cc     | 69 +++++++++++++++++++\n 2 files changed, 70 insertions(+)\n create mode 100644 libstdc++-v3/testsuite/20_util/expected/lwg3843.cc",
    "diff": "diff --git a/libstdc++-v3/include/std/expected b/libstdc++-v3/include/std/expected\nindex 7de2aeffc70c..5dc1dfbe5b8a 100644\n--- a/libstdc++-v3/include/std/expected\n+++ b/libstdc++-v3/include/std/expected\n@@ -1541,6 +1541,7 @@ namespace __expected\n       value() &&\n       {\n \tstatic_assert( is_copy_constructible_v<_Er> );\n+\tstatic_assert( is_move_constructible_v<_Er> );\n \tif (_M_has_value) [[likely]]\n \t  return;\n \t_GLIBCXX_THROW_OR_ABORT(bad_expected_access<_Er>(std::move(_M_unex)));\ndiff --git a/libstdc++-v3/testsuite/20_util/expected/lwg3843.cc b/libstdc++-v3/testsuite/20_util/expected/lwg3843.cc\nnew file mode 100644\nindex 000000000000..2afb9cc680bf\n--- /dev/null\n+++ b/libstdc++-v3/testsuite/20_util/expected/lwg3843.cc\n@@ -0,0 +1,69 @@\n+// { dg-do compile { target c++23 } }\n+// { dg-options \"-fno-exceptions\" }\n+\n+#include <expected>\n+\n+// 3843. std::expected<T,E>::value() & assumes E is copy constructible\n+void\n+test_lwg3843()\n+{\n+  struct E1 {\n+      E1(int) { }\n+      E1(E1&) { }\n+      E1(const E1&) = delete;\n+  };\n+  std::expected<int, E1> v1;\n+  v1.value(); // { dg-error \"here\" }\n+  const auto& v1c = v1;\n+  v1c.value(); // { dg-error \"here\" }\n+\n+  struct E2 {\n+    E2(int) { }\n+    E2(const E2&) { }\n+    E2(E2&&) = delete;\n+  };\n+  std::expected<int, E2> v2;\n+  v2.value();\n+  std::move(v2).value(); // { dg-error \"here\" }\n+  const auto& v2c = v2;\n+  v2c.value();\n+  std::move(v2c).value();\n+\n+  struct E3 {\n+    E3(int) { }\n+    E3(const E3&) { }\n+    E3(E3&&) { }\n+    E3(const E3&&) = delete;\n+  };\n+  std::expected<int, E3> v3;\n+  v3.value();\n+  std::move(v3).value();\n+  const auto& v3c = v3;\n+  v3c.value();\n+  std::move(v3c).value(); // { dg-error \"here\" }\n+}\n+\n+// 3940. std::expected<void, E>::value() also needs E to be copy constructible\n+void\n+test_lwg3940()\n+{\n+  struct E1 {\n+      E1(int) { }\n+      E1(E1&) { }\n+      E1(const E1&) = delete;\n+  };\n+  std::expected<void, E1> v1;\n+  v1.value(); // { dg-error \"here\" }\n+\n+  struct E2 {\n+    E2(int) { }\n+    E2(const E2&) { }\n+    E2(E2&&) = delete;\n+  };\n+  std::expected<void, E2> v2;\n+  std::move(v2).value(); // { dg-error \"here\" }\n+}\n+\n+// { dg-error \"static assertion failed\" \"\" { target *-*-* } 0 }\n+// { dg-prune-output \"use of deleted function\" }\n+// { dg-prune-output \"control reaches end of non-void function\" }\n",
    "prefixes": [
        "v1",
        "1/1"
    ]
}