Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2231476/?format=api
{ "id": 2231476, "url": "http://patchwork.ozlabs.org/api/patches/2231476/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260430181908.661233-1-tkaminsk@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": "<20260430181908.661233-1-tkaminsk@redhat.com>", "list_archive_url": null, "date": "2026-04-30T18:18:19", "name": "libsdc++: Remove duplicated __mdspan::__is_constant_wrapper.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "028e8fb3859021c14cad597f2a22ad10010a6459", "submitter": { "id": 90409, "url": "http://patchwork.ozlabs.org/api/people/90409/?format=api", "name": "Tomasz Kamiński", "email": "tkaminsk@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260430181908.661233-1-tkaminsk@redhat.com/mbox/", "series": [ { "id": 502355, "url": "http://patchwork.ozlabs.org/api/series/502355/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502355", "date": "2026-04-30T18:18:19", "name": "libsdc++: Remove duplicated __mdspan::__is_constant_wrapper.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502355/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2231476/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2231476/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=eVNnTZhx;\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=eVNnTZhx", "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 4g62X14zDzz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 04:19:59 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 5790C436A042\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 18:19:52 +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 A0247436F3DE\n for <gcc-patches@gcc.gnu.org>; Thu, 30 Apr 2026 18:19:14 +0000 (GMT)", "from mx-prod-mc-05.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-97-bmeiAK3CMni3rBcxzVkTqg-1; Thu,\n 30 Apr 2026 14:19:11 -0400", "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 5C9AA19560A7; Thu, 30 Apr 2026 18:19:10 +0000 (UTC)", "from localhost (unknown [10.44.32.8])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 7CA2C180045E; Thu, 30 Apr 2026 18:19:09 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 5790C436A042", "OpenDKIM Filter v2.11.0 sourceware.org A0247436F3DE" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org A0247436F3DE", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org A0247436F3DE", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777573154; cv=none;\n b=qs+6UsDJ78Xa6PdtEbDcmudgI1fs4A/mPKmmJwPsliH1shh25jgblcgOSKWEKHQc6oKObyTO2efzbt6rh2OZvFgMObS+m8TYfGjb5CtSUEpg27/XfnnJlBijp4f9WqmuOMonWnkjfPiLCwhjsnbD9pH0fvS4OlMy38Ik7LPOT70=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777573154; c=relaxed/simple;\n bh=x3/0j0rgTS7xmT+FHCqrHIW2xEQc7Hz9vnUpz6m8JzA=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=X93CkA22eUomfWQkhUygjXUWxaGPbyfmA+ctHBct5CtQIaT8aaitOxxtql8GC8ifyTWg72ExmD+GnGX3WSV4cn+b2392YYkWx+jHrvaXqKUsumzQ7gogUVfR68fF/O+PfaF1/rUO2l7pfbWe2N46KokaycviCuWKL708FPvFJyg=", "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=1777573154;\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=CG9OU50B4utT1hjMJwb5/h5CdQ4iWv8xrwvK+bG/1w8=;\n b=eVNnTZhxd7d13uiCpBvhxaZeOYQJX/EiHDcjuAL67ZY1koaIv34lv31ZhSJ3m9ZnPJBisZ\n kuP06kf8+KvNaIRj+uHJu/+xWHTH+CaA993QBYGNXZc8NKP1T62sa5cOCKKkRpL863SHzA\n xUKm6tU85F4hvHrQT6FN9f1ss1r+ug8=", "X-MC-Unique": "bmeiAK3CMni3rBcxzVkTqg-1", "X-Mimecast-MFC-AGG-ID": "bmeiAK3CMni3rBcxzVkTqg_1777573150", "From": "=?utf-8?q?Tomasz_Kami=C5=84ski?= <tkaminsk@redhat.com>", "To": "libstdc++@gcc.gnu.org,\n\tgcc-patches@gcc.gnu.org", "Subject": "[PATCH] libsdc++: Remove duplicated __mdspan::__is_constant_wrapper.", "Date": "Thu, 30 Apr 2026 20:18:19 +0200", "Message-ID": "<20260430181908.661233-1-tkaminsk@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "Nh9XQBR03nRIZXGj_acp6o4JpPnqmgU26LhgSi0nZj8_1777573150", "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": "Replaced it with std::__is_constant_wrapper_v from utility.\n\nlibstdc++-v3/ChangeLog:\n\n\t* include/std/mdspan: Replace eight spaces with tabs.\n\t(__mdspan::__is_constant_wrapper): Remove.\n\t(__mdspan::__acceptable_slice_type, __mdspan::__static_slice_extent)\n\t(__mdspan::__is_unit_stride_slice, __mdspan::__canonical_range_slice)\n\t(__mdspan::__check_inrange_index, __mdspan::__check_valid_index)\n\t(__mdspan::__check_valid_slice, std::submdspan): Replace\n\t__mdspan::__is_constant_wrapper with std::__is_constant_wrapper_v.\n---\nTesting on x86_64-linux. *mdspan* test already passed.\nOK for trunk?\n\n libstdc++-v3/include/std/mdspan | 69 +++++++++++++++------------------\n 1 file changed, 31 insertions(+), 38 deletions(-)", "diff": "diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan\nindex a3ab64633ac..5938bf09a94 100644\n--- a/libstdc++-v3/include/std/mdspan\n+++ b/libstdc++-v3/include/std/mdspan\n@@ -838,7 +838,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \n template<typename _Mapping>\n constexpr bool __is_padded_mapping = __is_left_padded_mapping<_Mapping>\n- || __is_right_padded_mapping<_Mapping>;\n+\t|| __is_right_padded_mapping<_Mapping>;\n #endif\n \n template<typename _PaddedMapping>\n@@ -904,13 +904,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t && std::cmp_less_equal(__value, __max);\n }\n \n- template<typename _Tp>\n- constexpr bool __is_constant_wrapper = false;\n-\n- template<_CwFixedValue _Xv, typename _Tp>\n- constexpr bool __is_constant_wrapper<constant_wrapper<_Xv, _Tp>>\n-\t= true;\n-\n template<size_t _Index, typename _Extents>\n constexpr auto\n __extract_extent(const _Extents& __exts)\n@@ -922,7 +915,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \n template<typename _Slice, typename _IndexType>\n concept __acceptable_slice_type = same_as<_Slice, full_extent_t>\n-\t || same_as<_Slice, _IndexType> || __is_constant_wrapper<_Slice>\n+\t || same_as<_Slice, _IndexType> || __is_constant_wrapper_v<_Slice>\n \t || __is_extent_slice<_Slice>;\n \n template<typename _IndexType, typename... _Slices>\n@@ -1003,7 +996,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t return _Extent;\n \telse if constexpr (same_as<_Slice, constant_wrapper<_IndexType(0)>>)\n \t return 0;\n-\telse if constexpr (__is_constant_wrapper<typename _Slice::extent_type>)\n+\telse if constexpr (__is_constant_wrapper_v<typename _Slice::extent_type>)\n \t return _Slice::extent_type::value;\n \telse\n \t return dynamic_extent;\n@@ -1204,7 +1197,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \n template<typename _Slice>\n concept __is_unit_stride_slice = (__mdspan::__is_extent_slice<_Slice>\n-\t && __mdspan::__is_constant_wrapper<typename _Slice::stride_type>\n+\t && __is_constant_wrapper_v<typename _Slice::stride_type>\n \t && _Slice::stride_type::value == 1)\n \t|| std::same_as<_Slice, full_extent_t>;\n \n@@ -1534,7 +1527,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n template<typename _OExtents>\n \trequires is_constructible_v<extents_type, _OExtents>\n \tconstexpr explicit(!(extents_type::rank() == 0\n-\t && is_convertible_v<_OExtents, extents_type>))\n+\t\t\t && is_convertible_v<_OExtents, extents_type>))\n \tmapping(const layout_stride::mapping<_OExtents>& __other) noexcept\n \t: mapping(__other.extents(), __mdspan::__internal_ctor{})\n \t{ __glibcxx_assert(*this == __other); }\n@@ -1710,7 +1703,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n template<typename _OExtents>\n \trequires is_constructible_v<extents_type, _OExtents>\n \tconstexpr explicit(!(extents_type::rank() == 0\n-\t && is_convertible_v<_OExtents, extents_type>))\n+\t\t\t && is_convertible_v<_OExtents, extents_type>))\n \tmapping(const layout_stride::mapping<_OExtents>& __other) noexcept\n \t: mapping(__other.extents(), __mdspan::__internal_ctor{})\n \t{ __glibcxx_assert(*this == __other); }\n@@ -3308,10 +3301,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t .extent = __span,\n \t .stride = cw<_IndexType(1)>\n \t};\n- else if constexpr (__is_constant_wrapper<_StrideType>)\n- {\n+ else if constexpr (__is_constant_wrapper_v<_StrideType>)\n+\t{\n \t static_assert(_StrideType::value > 0);\n-\t if constexpr (__is_constant_wrapper<_SpanType>)\n+\t if constexpr (__is_constant_wrapper_v<_SpanType>)\n \t return extent_slice{\n \t .offset = __offset,\n \t .extent = cw<_IndexType(1 + (_SpanType::value - 1) / _StrideType::value)>,\n@@ -3323,7 +3316,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t .extent = _IndexType(__span > 0 ? 1 + (__span - 1) / _StrideType::value : 0),\n \t .stride = __stride\n \t };\n- }\n+\t}\n else if (__span == 0 || __stride == 1)\n \treturn extent_slice{\n \t .offset = __offset,\n@@ -3331,7 +3324,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t .stride = _IndexType(1)\n \t};\n else\n- {\n+\t{\n \t __glibcxx_assert(__stride > 0);\n \t return extent_slice{\n \t .offset = __offset,\n@@ -3386,7 +3379,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n __check_inrange_index(const extents<_IndexType, _Extent>& __ext,\n \t\t\t const _OIndexType& __idx)\n {\n-\tif constexpr (__is_constant_wrapper<_OIndexType>\n+\tif constexpr (__is_constant_wrapper_v<_OIndexType>\n \t\t && _Extent != dynamic_extent)\n \t {\n \t static_assert(_OIndexType::value >= 0);\n@@ -3401,7 +3394,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n __check_valid_index(const extents<_IndexType, _Extent>& __ext,\n \t\t\t const _OIndexType& __idx)\n {\n-\tif constexpr (__is_constant_wrapper<_OIndexType>\n+\tif constexpr (__is_constant_wrapper_v<_OIndexType>\n \t\t && _Extent != dynamic_extent)\n \t {\n \t static_assert(_OIndexType::value >= 0);\n@@ -3427,31 +3420,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t\t\t\t constant_wrapper<_IndexType(0)>>)\n \t __mdspan::__check_valid_index(__ext, __slice.offset);\n \t else if constexpr (is_same_v<typename _Slice::extent_type,\n-\t\t\t\t constant_wrapper<_IndexType(1)>>)\n- __mdspan::__check_inrange_index(__ext, __slice.offset);\n-\t else if constexpr (__is_constant_wrapper<typename _Slice::extent_type>)\n+\t\t\t\t\t constant_wrapper<_IndexType(1)>>)\n+\t __mdspan::__check_inrange_index(__ext, __slice.offset);\n+\t else if constexpr (__is_constant_wrapper_v<typename _Slice::extent_type>)\n \t { \n- \t__mdspan::__check_inrange_index(__ext, __slice.offset);\n-\t\tif constexpr (__is_constant_wrapper<typename _Slice::stride_type>)\n+\t \t__mdspan::__check_inrange_index(__ext, __slice.offset);\n+\t\tif constexpr (__is_constant_wrapper_v<typename _Slice::stride_type>)\n \t\t static_assert(_Slice::stride_type::value > 0);\n \t\telse\n \t\t __glibcxx_assert(__slice.stride > 0);\n \n \t\tif constexpr (_Extent != dynamic_extent\n-\t\t && __is_constant_wrapper<typename _Slice::offset_type>)\n- static_assert(std::cmp_greater_equal(\n+\t\t && __is_constant_wrapper_v<typename _Slice::offset_type>)\n+\t\t static_assert(std::cmp_greater_equal(\n \t\t _Extent - _Slice::offset_type::value,\n \t\t _Slice::extent_type::value));\n \t\tif constexpr (_Extent != dynamic_extent\n-\t\t && __is_constant_wrapper<typename _Slice::stride_type>)\n- static_assert(std::cmp_greater(\n+\t\t && __is_constant_wrapper_v<typename _Slice::stride_type>)\n+\t\t static_assert(std::cmp_greater(\n \t\t _Extent,\n \t\t (_Slice::extent_type::value - 1) * _Slice::stride_type::value));\n \n \t\tif constexpr (_Extent != dynamic_extent\n-\t\t && __is_constant_wrapper<typename _Slice::offset_type>\n-\t && __is_constant_wrapper<typename _Slice::stride_type>)\n- static_assert(std::cmp_greater(\n+\t\t && __is_constant_wrapper_v<typename _Slice::offset_type>\n+\t\t && __is_constant_wrapper_v<typename _Slice::stride_type>)\n+\t\t static_assert(std::cmp_greater(\n \t\t _Extent - _Slice::offset_type::value,\n \t\t (_Slice::extent_type::value - 1) * _Slice::stride_type::value));\n \t\telse\n@@ -3460,18 +3453,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t\t (_Slice::extent_type::value - 1) * __slice.stride));\n \t }\n \t else if constexpr (is_same_v<typename _Slice::stride_type,\n- constant_wrapper<_IndexType(1)>>)\n+\t\t\t\t constant_wrapper<_IndexType(1)>>)\n \t {\n-\t __mdspan::__check_valid_index(__ext, __slice.offset);\n+\t\t__mdspan::__check_valid_index(__ext, __slice.offset);\n \t\t__glibcxx_assert(std::cmp_greater_equal(\n \t\t __ext.extent(0) - __slice.offset,\n \t\t __slice.extent));\n- }\n+\t }\n \t else if (__slice.extent == 0)\n \t __mdspan::__check_valid_index(__ext, __slice.offset);\n \t else\n \t {\n-\t __glibcxx_assert(__slice.offset < __ext.extent(0));\n+\t\t__glibcxx_assert(__slice.offset < __ext.extent(0));\n \t\t__glibcxx_assert(__slice.extent == 1 || __slice.stride > 0);\n \t\t__glibcxx_assert(__slice.extent == 1 || std::cmp_greater(\n \t\t __ext.extent(0) - __slice.offset,\n@@ -3479,7 +3472,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t }\n \t }\n \telse if constexpr (!is_same_v<_Slice, full_extent_t>)\n- __mdspan::__check_inrange_index(__ext, __slice);\n+\t __mdspan::__check_inrange_index(__ext, __slice);\n }\n \n template<typename _Extents, typename... _Slices>\n@@ -3548,7 +3541,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \t typename _Accessor, typename... _RawSlices>\n requires (sizeof...(_RawSlices) == _Extents::rank()\n \t&& __mdspan::__sliceable_mapping<typename _Layout::template mapping<_Extents>,\n-\t __mdspan::__full_extent_t<_RawSlices>...>)\n+\t\t\t\t\t __mdspan::__full_extent_t<_RawSlices>...>)\n constexpr auto\n submdspan(\n \tconst mdspan<_ElementType, _Extents, _Layout, _Accessor>& __md,\n", "prefixes": [] }