get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195377,
    "url": "http://patchwork.ozlabs.org/api/patches/2195377/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260210220143.1874233-1-ppalka@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": "<20260210220143.1874233-1-ppalka@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-10T22:01:43",
    "name": "c++: relax ref-qual overloading rules for C++20 [PR98939]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7f1fa6ef7873aaaf3752bef373189913bae95e3c",
    "submitter": {
        "id": 78319,
        "url": "http://patchwork.ozlabs.org/api/people/78319/?format=api",
        "name": "Patrick Palka",
        "email": "ppalka@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260210220143.1874233-1-ppalka@redhat.com/mbox/",
    "series": [
        {
            "id": 491744,
            "url": "http://patchwork.ozlabs.org/api/series/491744/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491744",
            "date": "2026-02-10T22:01:43",
            "name": "c++: relax ref-qual overloading rules for C++20 [PR98939]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491744/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195377/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195377/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=cIaMDS4b;\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=cIaMDS4b",
            "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 4f9bC94tPrz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 09:02:29 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 908AC4BA23C2\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 22:02:27 +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 16C834BA23D9\n for <gcc-patches@gcc.gnu.org>; Tue, 10 Feb 2026 22:01:50 +0000 (GMT)",
            "from mail-qt1-f200.google.com (mail-qt1-f200.google.com\n [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-490-H1k8X6kfN-KstXMFHw33cg-1; Tue, 10 Feb 2026 17:01:48 -0500",
            "by mail-qt1-f200.google.com with SMTP id\n d75a77b69052e-50149945d26so29675241cf.3\n for <gcc-patches@gcc.gnu.org>; Tue, 10 Feb 2026 14:01:48 -0800 (PST)",
            "from idea ([2600:4040:aa68:6000:9e8e:99ff:fed1:71f])\n by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-50682edeea0sm200461cf.3.2026.02.10.14.01.44\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 10 Feb 2026 14:01:45 -0800 (PST)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 908AC4BA23C2",
            "OpenDKIM Filter v2.11.0 sourceware.org 16C834BA23D9"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 16C834BA23D9",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 16C834BA23D9",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770760910; cv=none;\n b=NxgADIk/DbXXR+/Sci13LNqhWhGnZDpZ0qA757dMieBKPx4uZacp00eb34gGmurt35T5pPpFEvy+tbusA8F8x2mjORNrIjsZR2NMBw4b8o/YHBJpuUIbmIknlf2A/NKyNfsav+Umk6Pnn0IhwdhmcfNhfTMzdOfiJpqHjavE2vQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770760910; c=relaxed/simple;\n bh=BXqMXrn8p+H1So7jGNR3T9GTruLmy03UfXLbE8grJb8=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=kkZU9WHHzvg8Vy+FX2FSSrYPrmLIYOzYdNdLW+LBXcfHhnbFyPpx7WBLjPqrzDbCOlGTb7j4bRQtqDQDhL6EZzRPwEJoNrTBt9S5x++6n67ucwxgNgu7aMS15zfc3WnwsfiVznAvIJKJhl65sghdwRtW/dPhShDKr7bxwmRnryg=",
        "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=1770760909;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=BQTmmAqluBO89K4lkCBgwlbVcw3Kwjo6bmAgbxxDye0=;\n b=cIaMDS4biH+jXMj4w/mcPmxrBPlkrboGMMoiGQRWjQjioKuF3maxmxsTIJMEkv2pOszpHT\n 4CwFonpT9nzd8GAgJVww2V9hYFBo7zeDeKOb5sgiX2nbHmlr3xDvc3yO9VeoJdQpQjYy7s\n SF6BGVRGC44p2PbVqLMfdrwNZY8PRq8=",
        "X-MC-Unique": "H1k8X6kfN-KstXMFHw33cg-1",
        "X-Mimecast-MFC-AGG-ID": "H1k8X6kfN-KstXMFHw33cg_1770760908",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770760907; x=1771365707;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=BQTmmAqluBO89K4lkCBgwlbVcw3Kwjo6bmAgbxxDye0=;\n b=OXo7EbCVAS27za9oe244FemuotfGSeSoe1F1TXvXkqyVq9msEbk+tKYWKZNeKojUBh\n ZfLZfA1yrErl25yq4hfcD4Bw5Xef8suMZnZ+k/dYWFDrtNl9W3lwoQxXA4KgP84oWFhb\n QF98jyMrcI/X6Ac9RDIoRLCBVPC5TDXXN+ohgSFkswiLNuTkx8TZh4NdVP1wRNbpNTrS\n 9MFImQ7fDnFgDKD6+frKAHL4UB4iSJoh6Ej1qSP3URmb6QU2RlGMfyM0FGD86XSTN8hD\n KlayWCy+Z/YoEQL2m68+7rBy/5DhqHk+55Pr/5eNEE0GukE3Ks3bK/XkehkA6g6Vl1dV\n T0+Q==",
        "X-Gm-Message-State": "AOJu0Ywl1tKbL+rKDLymQc3V/LtnjBXRkFKmBmhOcvb84cax874Ihv2E\n cw8X2BfW/Ar6ZyPh71PXJYSWAhz3eLhSU4pXYf0+0xJCTWzAV7ZgOckHLICz6Rna8yJtf6QyHpi\n GFbLQOrk7VuNNtshylpy6RjJYUaALEPPLbxYoIMHPy7dYYF9RqkYzh3HF8hwlqv90YjlTerxsYJ\n jyK9jHsTPwc5DZz+wQe0Pvxy1dD1QurkQSDY6XkZXK",
        "X-Gm-Gg": "AZuq6aLUHqolKahEO2+bEKxVXX2xGzltyoHOJcp5UCLHcofzITACSlnKdyXY7Is4v7g\n baRVgXlKdeZpOR+hCktNW88/q3AfUhRFgQMfpINN8IHyHGwYmZIcXyrPb5Ic2nklTe0fMbDrVir\n 8i8yl5d10jfXHLYBnBJgw2Qyi9cIhsyiM6yhN52Goatxw3jkfRS9ZxEnmVcsyfaNt3vuUeiqa4t\n zHfMcUHSoQrFqV2ZCdLwPZinzN4R9KyJK1zhMFnyOJPKeB19DNRbPa1NdC3b92odrWx3T+eop7h\n a+DDEkHw8sZsRUzqgH2BCusjbRLfshZnKHyjmFHAJeNVIaWjeX2laQbzg5JFJme0xV1AyE1vST7\n U/B/YenOkbZI=",
        "X-Received": [
            "by 2002:a05:622a:181b:b0:501:4504:6f80 with SMTP id\n d75a77b69052e-50673e37beemr35800511cf.9.1770760907188;\n Tue, 10 Feb 2026 14:01:47 -0800 (PST)",
            "by 2002:a05:622a:181b:b0:501:4504:6f80 with SMTP id\n d75a77b69052e-50673e37beemr35799911cf.9.1770760906391;\n Tue, 10 Feb 2026 14:01:46 -0800 (PST)"
        ],
        "From": "Patrick Palka <ppalka@redhat.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "jason@redhat.com, tkaminsk@redhat.com, Patrick Palka <ppalka@redhat.com>",
        "Subject": "[PATCH] c++: relax ref-qual overloading rules for C++20 [PR98939]",
        "Date": "Tue, 10 Feb 2026 17:01:43 -0500",
        "Message-ID": "<20260210220143.1874233-1-ppalka@redhat.com>",
        "X-Mailer": "git-send-email 2.53.0.68.g864f55e190",
        "MIME-Version": "1.0",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "969ND1fBtmX9XeVBaB7Vff5LYix3Pqy8HqCS7WM3DJU_1770760908",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk?\n\n-- >8 --\n\nAs explained in one of Tomasz's library papers P2438R2[1], C++20 allows\nmember functions to have both ref-qualified and non-ref-qualified\noverloads, but at the time of writing no compiler supported that.  This\npatch implements this C++20 relaxation so that we can in turn implement\nP2438R2 as originally intended -- without needing to change the\nsignature of the original string::substr overload.\n\n[1]: https://wg21.link/P2438R2#_modifying_existing_const_overload\n\n\tPR c++/98939\n\tPR libstdc++/119745\n\ngcc/cp/ChangeLog:\n\n\t* class.cc (object_parms_correspond): Allow differing\n\tFUNCTION_REF_QUALIFIED in C++20.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/cpp0x/ref-qual5.C: Expect no diagnostics in C++20.\n---\n gcc/cp/class.cc                        | 7 ++++---\n gcc/testsuite/g++.dg/cpp0x/ref-qual5.C | 7 ++++---\n 2 files changed, 8 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc\nindex 315ffd316ffb..a223f71dbbe9 100644\n--- a/gcc/cp/class.cc\n+++ b/gcc/cp/class.cc\n@@ -1223,9 +1223,10 @@ object_parms_correspond (tree fn, tree method, tree context)\n       && DECL_IOBJ_MEMBER_FUNCTION_P (method))\n     {\n       /* Either both or neither need to be ref-qualified for\n-\t differing quals to allow overloading.  */\n-      if ((FUNCTION_REF_QUALIFIED (fn_type)\n-\t   == FUNCTION_REF_QUALIFIED (method_type))\n+\t differing quals to allow overloading before C++20 (P1787R6).  */\n+      if ((cxx_dialect >= cxx20\n+\t   || (FUNCTION_REF_QUALIFIED (fn_type)\n+\t       == FUNCTION_REF_QUALIFIED (method_type)))\n \t  && (type_memfn_quals (fn_type) != type_memfn_quals (method_type)\n \t      || type_memfn_rqual (fn_type) != type_memfn_rqual (method_type)))\n \treturn false;\ndiff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C\nindex e3d26e5a78fa..42e9bd3b4aee 100644\n--- a/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C\n+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C\n@@ -1,5 +1,6 @@\n // 13.1: ...cannot be overloaded if any of them, but not all, have a\n // ref-qualifier.\n+// In C++20 this was relaxed by P1787R6 \"Declarations and where to find them\"\n \n // { dg-require-effective-target c++11 }\n \n@@ -7,7 +8,7 @@ class Y {\n   void h() &;\n   void h() const &;\t       // OK\n   void h() &&;\t\t       // OK, all declarations have a ref-qualifier\n-  void i() &;\t\t       // { dg-message \"\" }\n-  void i() const;\t       // { dg-error \"\" } prior declaration of i\n-\t\t\t       // has a ref-qualifier\n+  void i() &;\t\t       // { dg-message \"\" \"\" { target c++17_down } }\n+  void i() const;\t       // { dg-error \"\" \"\" { target c++17_down } }\n+\t\t\t       // prior declaration of i has a ref-qualifier\n };\n",
    "prefixes": []
}