{"id":2223091,"url":"http://patchwork.ozlabs.org/api/patches/2223091/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20260414123609.785497-1-tkaminsk@redhat.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","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":"<20260414123609.785497-1-tkaminsk@redhat.com>","list_archive_url":null,"date":"2026-04-14T12:35:11","name":"[committed] libstdc++: Fix constant_wrapper compile-time test for COW strings.","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"246326ff83136d9edc467fb4eb5e64743a303ad6","submitter":{"id":90409,"url":"http://patchwork.ozlabs.org/api/people/90409/?format=json","name":"Tomasz Kaminski","email":"tkaminsk@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260414123609.785497-1-tkaminsk@redhat.com/mbox/","series":[{"id":499830,"url":"http://patchwork.ozlabs.org/api/series/499830/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=499830","date":"2026-04-14T12:35:11","name":"[committed] libstdc++: Fix constant_wrapper compile-time test for COW strings.","version":1,"mbox":"http://patchwork.ozlabs.org/series/499830/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2223091/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2223091/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=L/Xcc1vG;\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=L/Xcc1vG","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.129.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 4fw3gJ5FVSz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 22:36:43 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 420B84BA2E39\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 12:36:41 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 71B6D4BA2E09\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 12:36:14 +0000 (GMT)","from mx-prod-mc-03.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-501-sL9D9ZigNQm_GbmVA7doiA-1; Tue,\n 14 Apr 2026 08:36:12 -0400","from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 52EA61956062; Tue, 14 Apr 2026 12:36:11 +0000 (UTC)","from localhost (unknown [10.44.33.215])\n by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id B2AB819560AB; Tue, 14 Apr 2026 12:36:10 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 420B84BA2E39","OpenDKIM Filter v2.11.0 sourceware.org 71B6D4BA2E09"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 71B6D4BA2E09","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 71B6D4BA2E09","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776170174; cv=none;\n b=k9i40PyYGWLjfnJjHTQ91SJi+KXQtlxyAWKpHxhVGoM+QC+7eaSlEnsmjQ6pGnZ/Ec2sRdl3qq8x94hNoa4rC7oZf5UD4LerGvemagNIoyFFe3sg7+ZvCq7Xet03zaF06IUwPObOqKPfxQXOsUBWRUWKH+IewfnR3ZvrGN6b02E=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776170174; c=relaxed/simple;\n bh=QGVfgYJD1fOgdq/6oZ2nN1DPSbLawZYh6Bf+2hVngYs=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=I5JWeQtzaC+m0omSu/iCStH49/5LLlzYvdJoIBlxfdlibEUJ6Ja1Cew9wZZU6uJw6rpx0w6Vv40LxOqs4AA790pCSjivTz7dsB+1JERPfyTN5M6Oa1EJ/N97bGpdudkOEw5NtcZNWF245wDiiw1Lq5aNVIodWcXutdVjfBkt1PI=","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=1776170174;\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=S7fX8O34c8y3En6Swk2R/YyQSDvCc5qFowaR9Vsfmj4=;\n b=L/Xcc1vGQi3YwdzdQq1rpZlElv+13LNH9Ju3Ih32xfo4VrdDGcMcLVbDNYLcwA9FLculIJ\n QtGtKL2TVsom/TQX5LcOWt0oe7vt8AHGptSTrL4FZlkvMzs+T0opne53cEh/p8tDCazSJq\n XRS0aflgMt1wHifTq2eyqEgNFV4kuCA=","X-MC-Unique":"sL9D9ZigNQm_GbmVA7doiA-1","X-Mimecast-MFC-AGG-ID":"sL9D9ZigNQm_GbmVA7doiA_1776170171","From":"=?utf-8?q?Tomasz_Kami=C5=84ski?= <tkaminsk@redhat.com>","To":"libstdc++@gcc.gnu.org,\n\tgcc-patches@gcc.gnu.org","Subject":"[committed] libstdc++: Fix constant_wrapper compile-time test for COW\n strings.","Date":"Tue, 14 Apr 2026 14:35:11 +0200","Message-ID":"<20260414123609.785497-1-tkaminsk@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.12","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"L99UuC4xnwOE3zBIBqGUCgqApLBV7lDISHDAPNlxJe4_1776170171","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":"Throwing std::invalid_argument at compile time is only supported for\nSSO strings, replaced with custom class.\n\nlibstdc++-v3/ChangeLog:\n\n\t* testsuite/20_util/constant_wrapper/generic.cc: Replace\n\tstd::std::invalid_argument with NegativeArgument and\n\tremoved <stdexcept> include.\n---\nOn last minute decided to replace throw 10, with something more meanigfull,\nand forgot about the COW string limitation.\n\nPushed to trunk.\n\n .../testsuite/20_util/constant_wrapper/generic.cc     | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)","diff":"diff --git a/libstdc++-v3/testsuite/20_util/constant_wrapper/generic.cc b/libstdc++-v3/testsuite/20_util/constant_wrapper/generic.cc\nindex 7538efead49..bd41fc4ca3a 100644\n--- a/libstdc++-v3/testsuite/20_util/constant_wrapper/generic.cc\n+++ b/libstdc++-v3/testsuite/20_util/constant_wrapper/generic.cc\n@@ -2,7 +2,6 @@\n #include <functional>\n #include <utility>\n #include <string_view>\n-#include <stdexcept>\n \n #include <testsuite_hooks.h>\n \n@@ -172,13 +171,15 @@ struct MoveArgFunc\n   { return arg.v; }\n };\n \n+struct NegativeArgument {};\n+\n struct ThrowFunc\n {\n   static constexpr int\n   operator()(int i, int j)\n   {\n     if (i < 0 || j < 0)\n-      throw std::invalid_argument(\"negative\");\n+      throw NegativeArgument();\n     return i + j;\n   }\n };\n@@ -249,7 +250,7 @@ test_function_object()\n   try {\n     std::cw<ThrowFunc{}>(std::cw<-1>, std::cw<1>);\n     VERIFY(false);\n-  } catch (const std::invalid_argument&) {\n+  } catch (const NegativeArgument&) {\n     VERIFY(true);\n   }\n }\n@@ -322,7 +323,7 @@ struct ThrowIndex\n   operator[](int i, int j)\n   {\n     if (i < 0 || j < 0)\n-      throw std::invalid_argument(\"negative\");\n+      throw NegativeArgument();\n     return i * j;\n   }\n };\n@@ -391,7 +392,7 @@ test_indexable1()\n   try {\n     std::cw<ThrowIndex{}>[std::cw<-1>, std::cw<1>];\n     VERIFY(false);\n-  } catch (const std::invalid_argument&) {\n+  } catch (const NegativeArgument&) {\n     VERIFY(true);\n   }\n }\n","prefixes":["committed"]}