[{"id":3673590,"web_url":"http://patchwork.ozlabs.org/comment/3673590/","msgid":"<CAKiTkyQAZEP0y2ZsRnx7J8Rg2DCQBezTpzFKgDPD3RnuuPEi8g@mail.gmail.com>","list_archive_url":null,"date":"2026-04-05T18:33:19","subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","submitter":{"id":93063,"url":"http://patchwork.ozlabs.org/api/people/93063/","name":"Matthias Wippich","email":"mfwippich@gmail.com"},"content":">Will post an updated patch, but wouldn’t pre-CWG3135 wording also work, due to lifetime extension?\nWithout the changes from cwg3135, this cannot interact well with p2686\nconstexpr structured bindings. The non-constexpr case should be fine.\nThat's very unfortunate since the intended use is with p2686 constexpr\nbindings + p1061 pack-introducing bindings - therefore, implementing\np1789 without first addressing cwg3135 seems moot to me.\n\nAs Tomasz mentioned, I already submitted a patch for this end of last\nyear but waited to see whether we fix p1789 by addressing the core\nlanguage defect or by changing the library specification instead.\nSince cwg3135 is accepted now, I was going to update it as soon as\nJakub's patch for cwg3135 from 2 days ago is merged (so tests pass).\n\nSince your patch seems to be in better shape than mine, I do not mind\nabandoning the previous patch in favor of this one. @Tomasz: Which one\ndo you want to go ahead with? Does the release target change depending\non which one is used or is it going to be GCC 17 either way?\n\n\n\nOn Sun, Apr 5, 2026 at 1:38 PM Ivan Lazaric <ivan.lazaric1@gmail.com> wrote:\n>\n> https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p1789r3.pdf\n>\n> P1789 enables accessing the sequence values through structured bindings.\n> ```\n> auto [...values] = std::make_index_sequence<10>{};\n> // values is a pack of size 10, and elements 0, 1, 2, ..., 9\n> ```\n>\n> Corresponding C++ draft commit: 3d71a838ed2a1689dd329f964ec4d58152487151\n> Feature-test macro integer_sequence has been bumped to 202511L.\n>\n> libstdc++-v3/ChangeLog:\n>\n>         * include/bits/utility.h:\n>         Implement structured bindings protocol for std::integer_sequence.\n>         * include/bits/version.def: Bump integer_sequence feature-test macro.\n>         * include/bits/version.h: Regenerate.\n>         * testsuite/20_util/integer_sequence/structured_binding.cc: New test.\n>\n> Signed-off-by: Ivan Lazaric <ivan.lazaric1@gmail.com>\n> ---\n> Fixed a missing `std::` on `size_t` , thanks Linaro.\n> Extended the test.\n>\n> Only part that fails is the last block in `test_basic()`\n> I am pretty sure that's because of:\n> ```\n> static constexpr int&& x = 1;\n> static_assert(x == 1); // fails, would've worked if it was `const int&&` or `const int&`\n> ```\n>\n> https://godbolt.org/z/jM18sv5nh\n>\n>  libstdc++-v3/include/bits/utility.h           | 28 ++++++++\n>  libstdc++-v3/include/bits/version.def         |  5 ++\n>  libstdc++-v3/include/bits/version.h           |  7 +-\n>  .../integer_sequence/structured_binding.cc    | 72 +++++++++++++++++++\n>  4 files changed, 111 insertions(+), 1 deletion(-)\n>  create mode 100644 libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>\n> diff --git a/libstdc++-v3/include/bits/utility.h b/libstdc++-v3/include/bits/utility.h\n> index bd6b18d54dd..159884dd814 100644\n> --- a/libstdc++-v3/include/bits/utility.h\n> +++ b/libstdc++-v3/include/bits/utility.h\n> @@ -150,6 +150,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n>        static constexpr size_t size() noexcept { return sizeof...(_Idx); }\n>      };\n>\n> +#if __glibcxx_integer_sequence >= 202511L // C++ >= 26\n> +    template<typename _Tp, _Tp... _Idx>\n> +      struct tuple_size<integer_sequence<_Tp, _Idx...>>\n> +      : integral_constant<size_t, sizeof...(_Idx)> { };\n> +\n> +    template<size_t __i, class _Tp, _Tp... _Idx>\n> +      struct tuple_element<__i, integer_sequence<_Tp, _Idx...>>\n> +      {\n> +       static_assert(__i < sizeof...(_Idx));\n> +       using type = _Tp;\n> +      };\n> +\n> +    template<size_t __i, class _Tp, _Tp... _Idx>\n> +      struct tuple_element<__i, const integer_sequence<_Tp, _Idx...>>\n> +      {\n> +       static_assert(__i < sizeof...(_Idx));\n> +       using type = _Tp;\n> +      };\n> +\n> +    template<size_t __i, class _Tp, _Tp... _Idx>\n> +      constexpr _Tp\n> +      get (integer_sequence<_Tp, _Idx...>) noexcept\n> +      {\n> +       static_assert(__i < sizeof...(_Idx));\n> +       return _Idx...[__i];\n> +      }\n> +#endif // __glibcxx_integer_sequence >= 202511L\n> +\n>    /// Alias template make_integer_sequence\n>    template<typename _Tp, _Tp _Num>\n>      using make_integer_sequence\n> diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def\n> index 1265f01757c..81ec5723844 100644\n> --- a/libstdc++-v3/include/bits/version.def\n> +++ b/libstdc++-v3/include/bits/version.def\n> @@ -184,6 +184,11 @@ ftms = {\n>\n>  ftms = {\n>    name = integer_sequence;\n> +  values = {\n> +    v = 202511;\n> +    cxxmin = 26;\n> +    extra_cond = \"__cpp_pack_indexing\";\n> +  };\n>    values = {\n>      v = 201304;\n>      cxxmin = 14;\n> diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h\n> index 00f352089f7..cde4fa839db 100644\n> --- a/libstdc++-v3/include/bits/version.h\n> +++ b/libstdc++-v3/include/bits/version.h\n> @@ -186,7 +186,12 @@\n>  #undef __glibcxx_want_exchange_function\n>\n>  #if !defined(__cpp_lib_integer_sequence)\n> -# if (__cplusplus >= 201402L)\n> +# if (__cplusplus >  202302L) && (__cpp_pack_indexing)\n> +#  define __glibcxx_integer_sequence 202511L\n> +#  if defined(__glibcxx_want_all) || defined(__glibcxx_want_integer_sequence)\n> +#   define __cpp_lib_integer_sequence 202511L\n> +#  endif\n> +# elif (__cplusplus >= 201402L)\n>  #  define __glibcxx_integer_sequence 201304L\n>  #  if defined(__glibcxx_want_all) || defined(__glibcxx_want_integer_sequence)\n>  #   define __cpp_lib_integer_sequence 201304L\n> diff --git a/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n> new file mode 100644\n> index 00000000000..18cbcae53e5\n> --- /dev/null\n> +++ b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n> @@ -0,0 +1,72 @@\n> +// { dg-do compile { target c++26 } }\n> +\n> +#include <utility>\n> +#include <testsuite_hooks.h>\n> +\n> +#if __cpp_lib_integer_sequence < 202511L\n> +# error \"Feature-test macro __cpp_lib_integer_sequence is incorrect\"\n> +#endif\n> +\n> +constexpr auto\n> +destructure_sum(auto seq)\n> +{\n> +  auto [...elems] = seq;\n> +  return (0 + ... + elems);\n> +}\n> +\n> +using IS1 = std::make_index_sequence<10>;\n> +static_assert( std::tuple_size_v<IS1> == 10 );\n> +static_assert( std::is_same_v<std::tuple_element_t<3, IS1>, std::size_t> );\n> +static_assert( std::get<7>(IS1{}) == 7 );\n> +static_assert( destructure_sum(IS1{}) == 45 );\n> +\n> +using IS2 = std::integer_sequence<int, 42, 101, -13>;\n> +static_assert( std::tuple_size_v<IS2> == 3 );\n> +static_assert( std::is_same_v<std::tuple_element_t<1, IS2>, int> );\n> +static_assert( std::get<2>(IS2{}) == -13 );\n> +static_assert( destructure_sum(IS2{}) == 130 );\n> +\n> +using IS3 = std::integer_sequence<char>;\n> +static_assert( std::tuple_size_v<IS3> == 0 );\n> +\n> +template<typename = void>\n> +constexpr bool\n> +test_basic()\n> +{\n> +  {\n> +    auto [...elems] = std::make_index_sequence<10>{};\n> +\n> +    static_assert( sizeof...(elems) == 10 );\n> +\n> +    VERIFY( elems...[0] == 0 );\n> +    VERIFY( elems...[3] == 3 );\n> +    VERIFY( elems...[9] == 9 );\n> +  }\n> +\n> +  {\n> +    auto [...elems] = std::integer_sequence<int, 3, 5, 7, 11>{};\n> +\n> +    static_assert( sizeof...(elems) == 4 );\n> +\n> +    VERIFY( elems...[0] == 3 );\n> +    VERIFY( elems...[1] == 5 );\n> +    VERIFY( elems...[2] == 7 );\n> +    VERIFY( elems...[3] == 11 );\n> +  }\n> +\n> +  {\n> +    static constexpr auto [...elems] = std::integer_sequence<short, 2, 4, 8, 16>{};\n> +\n> +    static_assert( sizeof...(elems) == 4 );\n> +\n> +    // these fail\n> +    static_assert( elems...[0] == 2 );\n> +    static_assert( elems...[1] == 4 );\n> +    static_assert( elems...[2] == 8 );\n> +    static_assert( elems...[3] == 16 );\n> +  }\n> +\n> +  return true;\n> +}\n> +\n> +static_assert( test_basic() );\n> --\n> 2.43.0\n>","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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Iq0cTrn8;\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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Iq0cTrn8","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","sourceware.org; spf=pass smtp.mailfrom=gmail.com","server2.sourceware.org;\n arc=pass smtp.remote-ip=209.85.161.52"],"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 4fph1q2Zflz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 04:34:06 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D8CAA4BA9009\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  5 Apr 2026 18:34:04 +0000 (GMT)","from mail-oo1-f52.google.com (mail-oo1-f52.google.com\n [209.85.161.52])\n by sourceware.org (Postfix) with ESMTPS id BFB7E4BA2E19\n for <gcc-patches@gcc.gnu.org>; Sun,  5 Apr 2026 18:33:30 +0000 (GMT)","by mail-oo1-f52.google.com with SMTP id\n 006d021491bc7-68240e0d925so62383eaf.1\n for <gcc-patches@gcc.gnu.org>; Sun, 05 Apr 2026 11:33:30 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org D8CAA4BA9009","OpenDKIM Filter v2.11.0 sourceware.org BFB7E4BA2E19"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org BFB7E4BA2E19","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org BFB7E4BA2E19","ARC-Seal":["i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1775414010; cv=pass;\n b=JMuYhQCQ7QyH8yMdFZZa4nsBDrJAFDHK9H7v/4TJis5rgSSb8R/kIZa8PA+fbC3sxFDGbyKG04u2JNboKTX/+0EXJWVoqlEZ56T9K8j7v2s0dVGH0NTNUduuJDX1iTDLs5H4nN2sxWHQ+8PSlSii9v/S1vvqGXQTf6OWepT23zI=","i=1; a=rsa-sha256; t=1775414010; cv=none;\n d=google.com; s=arc-20240605;\n b=AxDSgCnJT/W/UDneZYQNuAXfN1wtTbei5wGXWlz+bZ7hpGeUCA2B6Ch/Evp9RQ0jdj\n VhWxWOlnQDaAD0QjX6w5DD6v837qKvBgZOmUrOKyqU1PjZmvPnTj03oTwtcKgT7qIcWW\n X2Er1ODu68Am5oxnZU8GTFG4sIe9Wla9Ea3f1XzBHNoylzpGmEzmTALWCM2B4RdTyVfw\n h0u6g+RramMCIw+GpMNn0R1VZwd9/vE7PUjNoCNAvabjfb7AqcCf8PnZAwUQPAimxFg+\n ui4Los2vz7/HokycTwgp4JpKjdowZmWxrl2q6irUQuK/F+2vvfjBxwOsrfPivlpBvpBZ\n JyeQ=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775414010; c=relaxed/simple;\n bh=csYRsfA0xffK8lQLm23LGaxN9lZ28GPaBhZ6XNFBVI0=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=p9PLXn2vGitsbl4om5X4Z1CufkpBfjtffGNd8PkZOLpz1K6B27eLct1F4fCOqfeyPIfIcpquVLgmJU1aSMmNBhJVYdFmP/3nSMJD1hjxuRVv1p0nGmpQ2jcL5yuPP4gjgKMufMYPn63tvpGqqYgLqQNgO+H1VkxE1KaBg2b/7ug=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:dkim-signature;\n bh=NA6T+4vf3m6/VKAQ0UA0H4i2Iwwupx3cmeZGJgsCD3Q=;\n fh=tNYxW3rLs7WtQ94ncFjPkWe07dsZvALL7BzV+PmmoKo=;\n b=gyiDYiA0FHPOQNafMR9sS9N0rPmB2el2zDYuxjf5K5lqUnRlwHo3B2vU4a5ZQp5jEM\n 120rBQqSelJnRoiRjlgem8VRN6nBYBQWSGMEq2f2p/ta6TTsakwFAsNhM4uE0DKtRbq7\n g9VxRNdUjpHrdckcWCNB6aj5I6NjIcdP3KK25AFEBS3bISzIaJ9HBnJ/uvE9QC6x4P5g\n AR6igLIZ+d5NC0Ff2tElhpo7U8pFPTFRkksKVmMrtL6dlapkSlXejcUE6V9lezXwSrCj\n tRr+h6oWdk5TXKoiWE4E4MrWyRZ8Onile4Aj7vIvOdH+Leyieity9qMPxUptvwgbpfqY\n OLsg==; darn=gcc.gnu.org"],"ARC-Authentication-Results":["i=2; server2.sourceware.org","i=1; mx.google.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775414010; x=1776018810; darn=gcc.gnu.org;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:from:to:cc:subject:date\n :message-id:reply-to;\n bh=NA6T+4vf3m6/VKAQ0UA0H4i2Iwwupx3cmeZGJgsCD3Q=;\n b=Iq0cTrn8QdygA1LrYJ2aH/iBRq9Q/POm36oM3eXPMscgnA+qby5YDXJ6woyrKGQr1V\n +mpyNwhnSyd95YPHpBQr7SkH3BOL+imYRLgryIF2ZpNWtRUc4HkmunKOy9pnYeAOd7xh\n BeXhcij07gjRvR3xX3DgJ/h8vh+HhDhpVRIbNkrAOg/BVUyE2PHx2VE7m8krcrA6v5MS\n GIFLVYL6rwDlSpHiGm5iNXCic2g2JzBDiMc62fX/cZVgzr89bJMPqd+ZdbgLf/EFnCuD\n RshTp4WpeiajjVoKYaCcw/mDXq+f5ReGwgnsCyAsnL/zG2taLJ3oCVHrVoqGQNLNiLua\n nL9w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775414010; x=1776018810;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=NA6T+4vf3m6/VKAQ0UA0H4i2Iwwupx3cmeZGJgsCD3Q=;\n b=C30PLH/BP2MbyVwpoUTwB71BSkwF5jDfJ4+iarh/NDHTlcdTcDx75uihR1aPAoTsbL\n JWi3JfEAQIRFZcmYuFZedjTLiMIiYoUpaKtL/b4B+dVF2LEQv7stQD+Tle7m70MrnTX+\n 1ruW/UCoMIH6crzaak9bEodxV8ouu/3LFyJopggqHDPqmZKY3XjPEnMEZumNf7+jo5aH\n Z+4PfFqbmJe7F89tLDgieiFwxQCUUun3O7YuNIc+FA0d1vUx9Bq8Y4iXgfebzt4BKWc2\n 8UJzIXDxqZm0EMrpr82AeRNtv0N7VZbZPHWGou0VrDlsQFAjwqis9Q36ccmQz6FuCm6h\n lAkA==","X-Forwarded-Encrypted":"i=1;\n AJvYcCVTsGweU3jnr/GiEmxD0xmOoxywJqaiF4R5CTGC1FMze+Py3a8I3l8XpQNlZsTjvHrqtfI/+el9eYhtOw==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YxJkl8a+a8CCWdj4LXOmodKm1R45T5jlnMn99zD5l88KZ830r6+\n si0fpjvIrjESu594RocLFm9OzSuovfsjYTOj8iKfvfMVyiC1OWkwruFnqWnU+DxoQZFKDshHrlw\n aQkv84rtf5qD+NrEqsPc4Mv3wW5Kpag==","X-Gm-Gg":"AeBDieszKF/hzFWbtiyo/vbcYqQeHdqhGUCgeS8RD+jLHdRuwoF2YpbzHG2ctzYLkhV\n Ht+1AvigJS8uB6DJNQsw1AfDVGtUe/b0pCH4mgmNBl+LJ5aPL0RGy7YCJeA83wr8w7x2pLiCtUt\n TkoiJOAIYfPyQbSRhbyp20vLaYB3wAR7K1j2VeQy8XLPsxUc4FtP3JigpgRRyxvlPksNVgwWkns\n Rhq+0VKjqhRYIPk9vr7fvJ8XGa7LCNf+pVTCgmDnMo5C7jXLrVMuBnPH8eMC7tmIDQGuDn9cve1\n xP5lgjBrGmqritWlLJHd/Rsyc66ape0jFJI=","X-Received":"by 2002:a05:6808:23c4:b0:468:776:1ec1 with SMTP id\n 5614622812f47-46efa68a1c1mr4119252b6e.3.1775414009908; Sun, 05 Apr 2026\n 11:33:29 -0700 (PDT)","MIME-Version":"1.0","References":"\n <CAKvuMXCT6BdqR2hv3GGbzQEiTyd=nR_127HHFSug97asAQnBbw@mail.gmail.com>\n <20260405123322.3064791-2-ivan.lazaric1@gmail.com>","In-Reply-To":"<20260405123322.3064791-2-ivan.lazaric1@gmail.com>","From":"Matthias Wippich <mfwippich@gmail.com>","Date":"Sun, 5 Apr 2026 19:33:19 +0100","X-Gm-Features":"AQROBzA3W8a2H1t2KDRLwLyFDLOicUYYsWqJl22q6f0XkYwVezCICoesS5JBy-0","Message-ID":"\n <CAKiTkyQAZEP0y2ZsRnx7J8Rg2DCQBezTpzFKgDPD3RnuuPEi8g@mail.gmail.com>","Subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","To":"Ivan Lazaric <ivan.lazaric1@gmail.com>","Cc":"tkaminsk@redhat.com, libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","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"}},{"id":3673599,"web_url":"http://patchwork.ozlabs.org/comment/3673599/","msgid":"<CA+hF1rVkriDof6pkg3jxK5C9iniph3BzWh8BNkhpdqeo+BZ3uQ@mail.gmail.com>","list_archive_url":null,"date":"2026-04-05T20:48:07","subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","submitter":{"id":92628,"url":"http://patchwork.ozlabs.org/api/people/92628/","name":"Ivan Lazaric","email":"ivan.lazaric1@gmail.com"},"content":"Clarifying, I implemented this for myself locally because it was useful\nin some reflection related code. I searched through my email for\npatches for this proposal, but it seems I haven’t been subscribed for long\nenough to find yours. It seemed simple enough so I cleaned it up a bit\nand posted.\n\nYou seem to have better understanding of the general situation here,\nso IMO it would be better for me to drop the work and let you continue.\nIf you wish to use any snippets from what I posted, feel free.\n\nI built locally with Jakubs patch, and the noted failures now pass.\nSomething that still fails though, which is explicitly mentioned in paper:\n\n    template for (constexpr auto index : std::make_index_sequence<20>{})\n        static_assert( index + 1 ); // error, not a constant expression\n\nDesugared a bit (also fails):\n\n  {\n    constexpr auto&& [a, b, c] = std::make_index_sequence<3>{};\n\n    static_assert( a == 0 );\n    static_assert( b == 1 );\n    static_assert( c == 2 );\n  }\n\nPlease verify this, as I could be missing some patches\n\nOn Sun, Apr 5, 2026 at 8:33 PM Matthias Wippich <mfwippich@gmail.com> wrote:\n\n> >Will post an updated patch, but wouldn’t pre-CWG3135 wording also work,\n> due to lifetime extension?\n> Without the changes from cwg3135, this cannot interact well with p2686\n> constexpr structured bindings. The non-constexpr case should be fine.\n> That's very unfortunate since the intended use is with p2686 constexpr\n> bindings + p1061 pack-introducing bindings - therefore, implementing\n> p1789 without first addressing cwg3135 seems moot to me.\n>\n> As Tomasz mentioned, I already submitted a patch for this end of last\n> year but waited to see whether we fix p1789 by addressing the core\n> language defect or by changing the library specification instead.\n> Since cwg3135 is accepted now, I was going to update it as soon as\n> Jakub's patch for cwg3135 from 2 days ago is merged (so tests pass).\n>\n> Since your patch seems to be in better shape than mine, I do not mind\n> abandoning the previous patch in favor of this one. @Tomasz: Which one\n> do you want to go ahead with? Does the release target change depending\n> on which one is used or is it going to be GCC 17 either way?\n>\n>\n>\n> On Sun, Apr 5, 2026 at 1:38 PM Ivan Lazaric <ivan.lazaric1@gmail.com>\n> wrote:\n> >\n> > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p1789r3.pdf\n> >\n> > P1789 enables accessing the sequence values through structured bindings.\n> > ```\n> > auto [...values] = std::make_index_sequence<10>{};\n> > // values is a pack of size 10, and elements 0, 1, 2, ..., 9\n> > ```\n> >\n> > Corresponding C++ draft commit: 3d71a838ed2a1689dd329f964ec4d58152487151\n> > Feature-test macro integer_sequence has been bumped to 202511L.\n> >\n> > libstdc++-v3/ChangeLog:\n> >\n> >         * include/bits/utility.h:\n> >         Implement structured bindings protocol for std::integer_sequence.\n> >         * include/bits/version.def: Bump integer_sequence feature-test\n> macro.\n> >         * include/bits/version.h: Regenerate.\n> >         * testsuite/20_util/integer_sequence/structured_binding.cc: New\n> test.\n> >\n> > Signed-off-by: Ivan Lazaric <ivan.lazaric1@gmail.com>\n> > ---\n> > Fixed a missing `std::` on `size_t` , thanks Linaro.\n> > Extended the test.\n> >\n> > Only part that fails is the last block in `test_basic()`\n> > I am pretty sure that's because of:\n> > ```\n> > static constexpr int&& x = 1;\n> > static_assert(x == 1); // fails, would've worked if it was `const int&&`\n> or `const int&`\n> > ```\n> >\n> > https://godbolt.org/z/jM18sv5nh\n> >\n> >  libstdc++-v3/include/bits/utility.h           | 28 ++++++++\n> >  libstdc++-v3/include/bits/version.def         |  5 ++\n> >  libstdc++-v3/include/bits/version.h           |  7 +-\n> >  .../integer_sequence/structured_binding.cc    | 72 +++++++++++++++++++\n> >  4 files changed, 111 insertions(+), 1 deletion(-)\n> >  create mode 100644\n> libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n> >\n> > diff --git a/libstdc++-v3/include/bits/utility.h\n> b/libstdc++-v3/include/bits/utility.h\n> > index bd6b18d54dd..159884dd814 100644\n> > --- a/libstdc++-v3/include/bits/utility.h\n> > +++ b/libstdc++-v3/include/bits/utility.h\n> > @@ -150,6 +150,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n> >        static constexpr size_t size() noexcept { return sizeof...(_Idx);\n> }\n> >      };\n> >\n> > +#if __glibcxx_integer_sequence >= 202511L // C++ >= 26\n> > +    template<typename _Tp, _Tp... _Idx>\n> > +      struct tuple_size<integer_sequence<_Tp, _Idx...>>\n> > +      : integral_constant<size_t, sizeof...(_Idx)> { };\n> > +\n> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n> > +      struct tuple_element<__i, integer_sequence<_Tp, _Idx...>>\n> > +      {\n> > +       static_assert(__i < sizeof...(_Idx));\n> > +       using type = _Tp;\n> > +      };\n> > +\n> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n> > +      struct tuple_element<__i, const integer_sequence<_Tp, _Idx...>>\n> > +      {\n> > +       static_assert(__i < sizeof...(_Idx));\n> > +       using type = _Tp;\n> > +      };\n> > +\n> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n> > +      constexpr _Tp\n> > +      get (integer_sequence<_Tp, _Idx...>) noexcept\n> > +      {\n> > +       static_assert(__i < sizeof...(_Idx));\n> > +       return _Idx...[__i];\n> > +      }\n> > +#endif // __glibcxx_integer_sequence >= 202511L\n> > +\n> >    /// Alias template make_integer_sequence\n> >    template<typename _Tp, _Tp _Num>\n> >      using make_integer_sequence\n> > diff --git a/libstdc++-v3/include/bits/version.def\n> b/libstdc++-v3/include/bits/version.def\n> > index 1265f01757c..81ec5723844 100644\n> > --- a/libstdc++-v3/include/bits/version.def\n> > +++ b/libstdc++-v3/include/bits/version.def\n> > @@ -184,6 +184,11 @@ ftms = {\n> >\n> >  ftms = {\n> >    name = integer_sequence;\n> > +  values = {\n> > +    v = 202511;\n> > +    cxxmin = 26;\n> > +    extra_cond = \"__cpp_pack_indexing\";\n> > +  };\n> >    values = {\n> >      v = 201304;\n> >      cxxmin = 14;\n> > diff --git a/libstdc++-v3/include/bits/version.h\n> b/libstdc++-v3/include/bits/version.h\n> > index 00f352089f7..cde4fa839db 100644\n> > --- a/libstdc++-v3/include/bits/version.h\n> > +++ b/libstdc++-v3/include/bits/version.h\n> > @@ -186,7 +186,12 @@\n> >  #undef __glibcxx_want_exchange_function\n> >\n> >  #if !defined(__cpp_lib_integer_sequence)\n> > -# if (__cplusplus >= 201402L)\n> > +# if (__cplusplus >  202302L) && (__cpp_pack_indexing)\n> > +#  define __glibcxx_integer_sequence 202511L\n> > +#  if defined(__glibcxx_want_all) ||\n> defined(__glibcxx_want_integer_sequence)\n> > +#   define __cpp_lib_integer_sequence 202511L\n> > +#  endif\n> > +# elif (__cplusplus >= 201402L)\n> >  #  define __glibcxx_integer_sequence 201304L\n> >  #  if defined(__glibcxx_want_all) ||\n> defined(__glibcxx_want_integer_sequence)\n> >  #   define __cpp_lib_integer_sequence 201304L\n> > diff --git\n> a/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n> b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n> > new file mode 100644\n> > index 00000000000..18cbcae53e5\n> > --- /dev/null\n> > +++\n> b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n> > @@ -0,0 +1,72 @@\n> > +// { dg-do compile { target c++26 } }\n> > +\n> > +#include <utility>\n> > +#include <testsuite_hooks.h>\n> > +\n> > +#if __cpp_lib_integer_sequence < 202511L\n> > +# error \"Feature-test macro __cpp_lib_integer_sequence is incorrect\"\n> > +#endif\n> > +\n> > +constexpr auto\n> > +destructure_sum(auto seq)\n> > +{\n> > +  auto [...elems] = seq;\n> > +  return (0 + ... + elems);\n> > +}\n> > +\n> > +using IS1 = std::make_index_sequence<10>;\n> > +static_assert( std::tuple_size_v<IS1> == 10 );\n> > +static_assert( std::is_same_v<std::tuple_element_t<3, IS1>,\n> std::size_t> );\n> > +static_assert( std::get<7>(IS1{}) == 7 );\n> > +static_assert( destructure_sum(IS1{}) == 45 );\n> > +\n> > +using IS2 = std::integer_sequence<int, 42, 101, -13>;\n> > +static_assert( std::tuple_size_v<IS2> == 3 );\n> > +static_assert( std::is_same_v<std::tuple_element_t<1, IS2>, int> );\n> > +static_assert( std::get<2>(IS2{}) == -13 );\n> > +static_assert( destructure_sum(IS2{}) == 130 );\n> > +\n> > +using IS3 = std::integer_sequence<char>;\n> > +static_assert( std::tuple_size_v<IS3> == 0 );\n> > +\n> > +template<typename = void>\n> > +constexpr bool\n> > +test_basic()\n> > +{\n> > +  {\n> > +    auto [...elems] = std::make_index_sequence<10>{};\n> > +\n> > +    static_assert( sizeof...(elems) == 10 );\n> > +\n> > +    VERIFY( elems...[0] == 0 );\n> > +    VERIFY( elems...[3] == 3 );\n> > +    VERIFY( elems...[9] == 9 );\n> > +  }\n> > +\n> > +  {\n> > +    auto [...elems] = std::integer_sequence<int, 3, 5, 7, 11>{};\n> > +\n> > +    static_assert( sizeof...(elems) == 4 );\n> > +\n> > +    VERIFY( elems...[0] == 3 );\n> > +    VERIFY( elems...[1] == 5 );\n> > +    VERIFY( elems...[2] == 7 );\n> > +    VERIFY( elems...[3] == 11 );\n> > +  }\n> > +\n> > +  {\n> > +    static constexpr auto [...elems] = std::integer_sequence<short, 2,\n> 4, 8, 16>{};\n> > +\n> > +    static_assert( sizeof...(elems) == 4 );\n> > +\n> > +    // these fail\n> > +    static_assert( elems...[0] == 2 );\n> > +    static_assert( elems...[1] == 4 );\n> > +    static_assert( elems...[2] == 8 );\n> > +    static_assert( elems...[3] == 16 );\n> > +  }\n> > +\n> > +  return true;\n> > +}\n> > +\n> > +static_assert( test_basic() );\n> > --\n> > 2.43.0\n> >\n>","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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=aYZGEODG;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=aYZGEODG","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","sourceware.org; spf=pass smtp.mailfrom=gmail.com","server2.sourceware.org;\n arc=pass smtp.remote-ip=209.85.216.49"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4fpl1r5vG4z1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 06:49:17 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 3059C4BA2E23\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  5 Apr 2026 20:49:15 +0000 (GMT)","from mail-pj1-f49.google.com (mail-pj1-f49.google.com\n [209.85.216.49])\n by sourceware.org (Postfix) with ESMTPS id 2AFAB4BA2E23\n for <gcc-patches@gcc.gnu.org>; Sun,  5 Apr 2026 20:48:22 +0000 (GMT)","by mail-pj1-f49.google.com with SMTP id\n 98e67ed59e1d1-35dac556bb2so2168529a91.1\n for <gcc-patches@gcc.gnu.org>; Sun, 05 Apr 2026 13:48:22 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 3059C4BA2E23","OpenDKIM Filter v2.11.0 sourceware.org 2AFAB4BA2E23"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 2AFAB4BA2E23","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 2AFAB4BA2E23","ARC-Seal":["i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1775422102; cv=pass;\n b=t4ZP/OO5EDd0YrmSaL5Pco+HZoDh6Vwonc8z6nuSeuPkZOlV47PdYG8Ep05obD9LSgtpSUR5mTRfxizFG7p6FnAKeEgWEo0OSaWazO/WsQ6P0QLqnl5NA7qLOfFxYal3Hz0w8WOWfIZ4Q+P+j+sYMRQ5yvm7/ei0kFqFvaj08Z0=","i=1; a=rsa-sha256; t=1775422101; cv=none;\n d=google.com; s=arc-20240605;\n b=R9fSG8XD4Tv7IlYXGbMp61Hgs5efiyt1v/nzcA2QO5CVYgcUsA18Z9CkkGVV8/7mF+\n C70sxySGG1DSCPsqf4R/hCCWPD8dGBghWB3JvQY2AYGz6Uxc9909KnVvAhhb6FGWDI6U\n 5UEtBK/bf6mNlLRLyNjQaUxZFEp1mpUn/YiI06u+f0IhXeE4UIr1FJUa0HNGAfZEZ5po\n 58zMFNpZA5EQBPbtblnevjP0VrOwUHEStxH7PjxSAyZWn4fShtxic8i3xyZ4UM0NEDyA\n xsDnYawWcVYvdFvN1nFUFQvaI8r4AlOCw6XEbR/rYsm/d2MFUUJoIAVZ3ozkfWz7KTlk\n zEOQ=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775422102; c=relaxed/simple;\n bh=pmGQhROWFloPf8npNAeMyv2Tq6YbEBNwB94gROnBPhU=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=t0kZm1qVvov1K3iT4lrYUcE9C7cPb8En9fNVvnN7WUBLrPq/LLj5SrMj25jCcxQIX3k+CN6M8sQS0w85oMzU5yEHZFuqxRdaKgpuIvHoWz/yD0nwdnapehlTvdtoH5g82G+6Y1h9QKsG30GQ3ZjNFdt/COP3dXgACOMGB2EcdQk=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:dkim-signature;\n bh=s5fqm3AXAMu4hzZyoDpkDbdHcaGUREiXuVc7RPxdOJw=;\n fh=IW8nR02QYkdc30rTuM2Ku+LgA6SPTNYbmorhHkEq/fY=;\n b=I2qEpoJXucGYhd+D7S0einvo2WIsmd2x3mV9CIwcqC4hziN6XSw3hMRLawhG4+wp5K\n YFuD+U1ZTvm4rMv40RXoMeqdkMvbLh2/amQaVfn/e83iL/x/5Qm1SFq+ywJxVVQF23Fq\n MlZeTTW6AhPQMX30PqKfexTQOMLYi2Wq6lsj6lgfFaGZHZ6YPJcNPZqG6UMUSi27D0dy\n Erk1RVW4z0szYCpJTbFVxeZ6EmtIAXkuO/sNW70IuS1DME4zOnOtCdW4ZUgXcQahDF4G\n HBoB/anzS0EhihyocIWkmplHrg4VMifFg9/55pGlhEsAzqGxNcs9lgsTJtOt6g5N0jjE\n IzwQ==; darn=gcc.gnu.org"],"ARC-Authentication-Results":["i=2; server2.sourceware.org","i=1; mx.google.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775422101; x=1776026901; darn=gcc.gnu.org;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:from:to:cc:subject:date:message-id:reply-to;\n bh=s5fqm3AXAMu4hzZyoDpkDbdHcaGUREiXuVc7RPxdOJw=;\n b=aYZGEODGJ7S/F5S2ypl+RmZZHyDBwsOYmMZOxw7VIRjq8vh/77YhUQssVir5lKsqi/\n N5qULeYhQuttC4TjM3ZhIDV01Kb/d+Gwe39DMqlZViHtX9BcCwy3EJjUe85IvqPjV69f\n gozbRDZY2Vh3hw9WtFJQaDqhvWnd5JTU3FqLlDQvs2bJOyz+WQP/p7E7CHo0LhGD4v0G\n ZtDEB6p/ZYwVaH3a/5lvWaiGnaIQt7ppwu7BT60uc5pt3aJa10/JSvcFlUM7Cn8j2tRD\n 8LBGXXNa1ykszr85u+Z1Je5NXIr0eEoSQLd9JCMd0BYhBTFKrSixq+PRkf5jL9m0nqgH\n aOYw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775422101; x=1776026901;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=s5fqm3AXAMu4hzZyoDpkDbdHcaGUREiXuVc7RPxdOJw=;\n b=aLR0C2mCJIfB+umDGKqx5+ia2Yw4SndsL525PwlG7Jf6XTop9uzbK+vsidtjnQ9xt0\n 7F11NAW+3aPg9jjAFvTK1p6SAhb6cDwKkvwo6XYEiG8m1CVdS4jFcjQOE2O1Iz/6BmF2\n vlc0H9FqfOF7+l9e6PIEMwRLapfYUyVVEkJRWXzYatsgqEhep1+29PoP+HPSUD9dRQrS\n DrQcPWfCcLgBRmSHg08OENBDoPCB0+mIW+KPyoLsYkqm5OqVvrTASc4H7V46krnQHqXT\n rnb/zYHAQULlaTWBwR3CUW0WqsjnnmvcHvl6t/gabKUEL34pT918cZWsCEz7PFGGIaik\n Tnqw==","X-Forwarded-Encrypted":"i=1;\n AJvYcCW73Zk0lcrZzgB2RK4os7bXjUV4lDqSuUUu8VT9ajTchZUQDbzmx48yTZ2zI1a6OjzU5zlJUb9Tgt0PyA==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YyxXq2G/AI7Z8ik6ABr6ohLileJI54n3MPLCzGiBgPcctShHy7Q\n 4loIGgD6U21tADouG/Me3H6zfM9kkOCw/1nEayH2N2CgKqMaGlZN9Jt1GHx/0K+T9js4uD+Iuxm\n UOyOc/WsgK/j3m4QxJ3PKZC2WE/Darfk=","X-Gm-Gg":"AeBDieuDGu2AiJ3zMRKfEznnR4w9JSkWwVzu/CnMnb0UZ5dmAnbz2tLiS/VEt+iGJ29\n Cax3RMHGwDDY7bbTUIOyt6MqdJVxf6Wpe6M5VypOHSK9Nv59LPjc/JAWowZSkk3ucFKZwUwtb7q\n fk0sexRSQvwa0df2oyuaSja5pycvmP3BqTKoMFm+2mq6nbch6sXVBRoOPr/Kf9ndY9Qn9cZIP/C\n MVhrrMWq9aksKO1Dlw/559qsOtkl5yjDsYkhfoRj+EIdvrzCxPZz7U7fktx0RV1GRMi00wqtAwo\n O8Dhyhxz7v5/TwzBiterq/LZGOwoDz6uiT0ZjO45cWm62eMY9+5HWlL0OAIZ92UmcqZ9nACgZwK\n l2GWLD1DLSpkHuh2oNWCGB9Q2E5rAZAm4QNWevCIE+3Th7MPAECoJt7F8vtU=","X-Received":"by 2002:a17:903:2acb:b0:2ae:57e6:616c with SMTP id\n d9443c01a7336-2b28164cbbcmr107089625ad.3.1775422100638; Sun, 05 Apr 2026\n 13:48:20 -0700 (PDT)","MIME-Version":"1.0","References":"\n <CAKvuMXCT6BdqR2hv3GGbzQEiTyd=nR_127HHFSug97asAQnBbw@mail.gmail.com>\n <20260405123322.3064791-2-ivan.lazaric1@gmail.com>\n <CAKiTkyQAZEP0y2ZsRnx7J8Rg2DCQBezTpzFKgDPD3RnuuPEi8g@mail.gmail.com>","In-Reply-To":"\n <CAKiTkyQAZEP0y2ZsRnx7J8Rg2DCQBezTpzFKgDPD3RnuuPEi8g@mail.gmail.com>","From":"Ivan Lazaric <ivan.lazaric1@gmail.com>","Date":"Sun, 5 Apr 2026 22:48:07 +0200","X-Gm-Features":"AQROBzDqxAFDi99roq3RMmQi7IHOpeiJXaxCwWUy26hFuyVmaP9gZBeRRraXnY4","Message-ID":"\n <CA+hF1rVkriDof6pkg3jxK5C9iniph3BzWh8BNkhpdqeo+BZ3uQ@mail.gmail.com>","Subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","To":"Matthias Wippich <mfwippich@gmail.com>","Cc":"tkaminsk@redhat.com, libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","Content-Type":"multipart/alternative; boundary=\"000000000000a29271064ebcab2d\"","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"}},{"id":3673682,"web_url":"http://patchwork.ozlabs.org/comment/3673682/","msgid":"<CAGNvRgDQQhpmhy4nLEEwhF9tEfPJQn=qLykDJjopuzFWpLAb+g@mail.gmail.com>","list_archive_url":null,"date":"2026-04-06T08:35:37","subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","submitter":{"id":17139,"url":"http://patchwork.ozlabs.org/api/people/17139/","name":"Daniel Krügler","email":"daniel.kruegler@gmail.com"},"content":"Am So., 5. Apr. 2026 um 22:49 Uhr schrieb Ivan Lazaric <\nivan.lazaric1@gmail.com>:\n\n> Clarifying, I implemented this for myself locally because it was useful\n> in some reflection related code. I searched through my email for\n> patches for this proposal, but it seems I haven’t been subscribed for long\n> enough to find yours. It seemed simple enough so I cleaned it up a bit\n> and posted.\n>\n> You seem to have better understanding of the general situation here,\n> so IMO it would be better for me to drop the work and let you continue.\n> If you wish to use any snippets from what I posted, feel free.\n>\n> I built locally with Jakubs patch, and the noted failures now pass.\n> Something that still fails though, which is explicitly mentioned in paper:\n>\n>     template for (constexpr auto index : std::make_index_sequence<20>{})\n>         static_assert( index + 1 ); // error, not a constant expression\n>\n> Desugared a bit (also fails):\n>\n>   {\n>     constexpr auto&& [a, b, c] = std::make_index_sequence<3>{};\n>\n>     static_assert( a == 0 );\n>     static_assert( b == 1 );\n>     static_assert( c == 2 );\n>   }\n>\n> Please verify this, as I could be missing some patches\n>\nThis is CWG 3135 (\nhttps://cplusplus.github.io/CWG/issues/cwg_active.html#3135), which was\naccepted in Croydon, but presumably not yet  implemented in gcc.\n\n- Daniel\n\n\n>\n> On Sun, Apr 5, 2026 at 8:33 PM Matthias Wippich <mfwippich@gmail.com>\n> wrote:\n>\n>> >Will post an updated patch, but wouldn’t pre-CWG3135 wording also work,\n>> due to lifetime extension?\n>> Without the changes from cwg3135, this cannot interact well with p2686\n>> constexpr structured bindings. The non-constexpr case should be fine.\n>> That's very unfortunate since the intended use is with p2686 constexpr\n>> bindings + p1061 pack-introducing bindings - therefore, implementing\n>> p1789 without first addressing cwg3135 seems moot to me.\n>>\n>> As Tomasz mentioned, I already submitted a patch for this end of last\n>> year but waited to see whether we fix p1789 by addressing the core\n>> language defect or by changing the library specification instead.\n>> Since cwg3135 is accepted now, I was going to update it as soon as\n>> Jakub's patch for cwg3135 from 2 days ago is merged (so tests pass).\n>>\n>> Since your patch seems to be in better shape than mine, I do not mind\n>> abandoning the previous patch in favor of this one. @Tomasz: Which one\n>> do you want to go ahead with? Does the release target change depending\n>> on which one is used or is it going to be GCC 17 either way?\n>>\n>>\n>>\n>> On Sun, Apr 5, 2026 at 1:38 PM Ivan Lazaric <ivan.lazaric1@gmail.com>\n>> wrote:\n>> >\n>> > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p1789r3.pdf\n>> >\n>> > P1789 enables accessing the sequence values through structured bindings.\n>> > ```\n>> > auto [...values] = std::make_index_sequence<10>{};\n>> > // values is a pack of size 10, and elements 0, 1, 2, ..., 9\n>> > ```\n>> >\n>> > Corresponding C++ draft commit: 3d71a838ed2a1689dd329f964ec4d58152487151\n>> > Feature-test macro integer_sequence has been bumped to 202511L.\n>> >\n>> > libstdc++-v3/ChangeLog:\n>> >\n>> >         * include/bits/utility.h:\n>> >         Implement structured bindings protocol for\n>> std::integer_sequence.\n>> >         * include/bits/version.def: Bump integer_sequence feature-test\n>> macro.\n>> >         * include/bits/version.h: Regenerate.\n>> >         * testsuite/20_util/integer_sequence/structured_binding.cc: New\n>> test.\n>> >\n>> > Signed-off-by: Ivan Lazaric <ivan.lazaric1@gmail.com>\n>> > ---\n>> > Fixed a missing `std::` on `size_t` , thanks Linaro.\n>> > Extended the test.\n>> >\n>> > Only part that fails is the last block in `test_basic()`\n>> > I am pretty sure that's because of:\n>> > ```\n>> > static constexpr int&& x = 1;\n>> > static_assert(x == 1); // fails, would've worked if it was `const\n>> int&&` or `const int&`\n>> > ```\n>> >\n>> > https://godbolt.org/z/jM18sv5nh\n>> >\n>> >  libstdc++-v3/include/bits/utility.h           | 28 ++++++++\n>> >  libstdc++-v3/include/bits/version.def         |  5 ++\n>> >  libstdc++-v3/include/bits/version.h           |  7 +-\n>> >  .../integer_sequence/structured_binding.cc    | 72 +++++++++++++++++++\n>> >  4 files changed, 111 insertions(+), 1 deletion(-)\n>> >  create mode 100644\n>> libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>> >\n>> > diff --git a/libstdc++-v3/include/bits/utility.h\n>> b/libstdc++-v3/include/bits/utility.h\n>> > index bd6b18d54dd..159884dd814 100644\n>> > --- a/libstdc++-v3/include/bits/utility.h\n>> > +++ b/libstdc++-v3/include/bits/utility.h\n>> > @@ -150,6 +150,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n>> >        static constexpr size_t size() noexcept { return\n>> sizeof...(_Idx); }\n>> >      };\n>> >\n>> > +#if __glibcxx_integer_sequence >= 202511L // C++ >= 26\n>> > +    template<typename _Tp, _Tp... _Idx>\n>> > +      struct tuple_size<integer_sequence<_Tp, _Idx...>>\n>> > +      : integral_constant<size_t, sizeof...(_Idx)> { };\n>> > +\n>> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n>> > +      struct tuple_element<__i, integer_sequence<_Tp, _Idx...>>\n>> > +      {\n>> > +       static_assert(__i < sizeof...(_Idx));\n>> > +       using type = _Tp;\n>> > +      };\n>> > +\n>> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n>> > +      struct tuple_element<__i, const integer_sequence<_Tp, _Idx...>>\n>> > +      {\n>> > +       static_assert(__i < sizeof...(_Idx));\n>> > +       using type = _Tp;\n>> > +      };\n>> > +\n>> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n>> > +      constexpr _Tp\n>> > +      get (integer_sequence<_Tp, _Idx...>) noexcept\n>> > +      {\n>> > +       static_assert(__i < sizeof...(_Idx));\n>> > +       return _Idx...[__i];\n>> > +      }\n>> > +#endif // __glibcxx_integer_sequence >= 202511L\n>> > +\n>> >    /// Alias template make_integer_sequence\n>> >    template<typename _Tp, _Tp _Num>\n>> >      using make_integer_sequence\n>> > diff --git a/libstdc++-v3/include/bits/version.def\n>> b/libstdc++-v3/include/bits/version.def\n>> > index 1265f01757c..81ec5723844 100644\n>> > --- a/libstdc++-v3/include/bits/version.def\n>> > +++ b/libstdc++-v3/include/bits/version.def\n>> > @@ -184,6 +184,11 @@ ftms = {\n>> >\n>> >  ftms = {\n>> >    name = integer_sequence;\n>> > +  values = {\n>> > +    v = 202511;\n>> > +    cxxmin = 26;\n>> > +    extra_cond = \"__cpp_pack_indexing\";\n>> > +  };\n>> >    values = {\n>> >      v = 201304;\n>> >      cxxmin = 14;\n>> > diff --git a/libstdc++-v3/include/bits/version.h\n>> b/libstdc++-v3/include/bits/version.h\n>> > index 00f352089f7..cde4fa839db 100644\n>> > --- a/libstdc++-v3/include/bits/version.h\n>> > +++ b/libstdc++-v3/include/bits/version.h\n>> > @@ -186,7 +186,12 @@\n>> >  #undef __glibcxx_want_exchange_function\n>> >\n>> >  #if !defined(__cpp_lib_integer_sequence)\n>> > -# if (__cplusplus >= 201402L)\n>> > +# if (__cplusplus >  202302L) && (__cpp_pack_indexing)\n>> > +#  define __glibcxx_integer_sequence 202511L\n>> > +#  if defined(__glibcxx_want_all) ||\n>> defined(__glibcxx_want_integer_sequence)\n>> > +#   define __cpp_lib_integer_sequence 202511L\n>> > +#  endif\n>> > +# elif (__cplusplus >= 201402L)\n>> >  #  define __glibcxx_integer_sequence 201304L\n>> >  #  if defined(__glibcxx_want_all) ||\n>> defined(__glibcxx_want_integer_sequence)\n>> >  #   define __cpp_lib_integer_sequence 201304L\n>> > diff --git\n>> a/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>> b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>> > new file mode 100644\n>> > index 00000000000..18cbcae53e5\n>> > --- /dev/null\n>> > +++\n>> b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>> > @@ -0,0 +1,72 @@\n>> > +// { dg-do compile { target c++26 } }\n>> > +\n>> > +#include <utility>\n>> > +#include <testsuite_hooks.h>\n>> > +\n>> > +#if __cpp_lib_integer_sequence < 202511L\n>> > +# error \"Feature-test macro __cpp_lib_integer_sequence is incorrect\"\n>> > +#endif\n>> > +\n>> > +constexpr auto\n>> > +destructure_sum(auto seq)\n>> > +{\n>> > +  auto [...elems] = seq;\n>> > +  return (0 + ... + elems);\n>> > +}\n>> > +\n>> > +using IS1 = std::make_index_sequence<10>;\n>> > +static_assert( std::tuple_size_v<IS1> == 10 );\n>> > +static_assert( std::is_same_v<std::tuple_element_t<3, IS1>,\n>> std::size_t> );\n>> > +static_assert( std::get<7>(IS1{}) == 7 );\n>> > +static_assert( destructure_sum(IS1{}) == 45 );\n>> > +\n>> > +using IS2 = std::integer_sequence<int, 42, 101, -13>;\n>> > +static_assert( std::tuple_size_v<IS2> == 3 );\n>> > +static_assert( std::is_same_v<std::tuple_element_t<1, IS2>, int> );\n>> > +static_assert( std::get<2>(IS2{}) == -13 );\n>> > +static_assert( destructure_sum(IS2{}) == 130 );\n>> > +\n>> > +using IS3 = std::integer_sequence<char>;\n>> > +static_assert( std::tuple_size_v<IS3> == 0 );\n>> > +\n>> > +template<typename = void>\n>> > +constexpr bool\n>> > +test_basic()\n>> > +{\n>> > +  {\n>> > +    auto [...elems] = std::make_index_sequence<10>{};\n>> > +\n>> > +    static_assert( sizeof...(elems) == 10 );\n>> > +\n>> > +    VERIFY( elems...[0] == 0 );\n>> > +    VERIFY( elems...[3] == 3 );\n>> > +    VERIFY( elems...[9] == 9 );\n>> > +  }\n>> > +\n>> > +  {\n>> > +    auto [...elems] = std::integer_sequence<int, 3, 5, 7, 11>{};\n>> > +\n>> > +    static_assert( sizeof...(elems) == 4 );\n>> > +\n>> > +    VERIFY( elems...[0] == 3 );\n>> > +    VERIFY( elems...[1] == 5 );\n>> > +    VERIFY( elems...[2] == 7 );\n>> > +    VERIFY( elems...[3] == 11 );\n>> > +  }\n>> > +\n>> > +  {\n>> > +    static constexpr auto [...elems] = std::integer_sequence<short, 2,\n>> 4, 8, 16>{};\n>> > +\n>> > +    static_assert( sizeof...(elems) == 4 );\n>> > +\n>> > +    // these fail\n>> > +    static_assert( elems...[0] == 2 );\n>> > +    static_assert( elems...[1] == 4 );\n>> > +    static_assert( elems...[2] == 8 );\n>> > +    static_assert( elems...[3] == 16 );\n>> > +  }\n>> > +\n>> > +  return true;\n>> > +}\n>> > +\n>> > +static_assert( test_basic() );\n>> > --\n>> > 2.43.0\n>> >\n>>\n>","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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=j83OlyTO;\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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=j83OlyTO","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","sourceware.org; spf=pass smtp.mailfrom=gmail.com","server2.sourceware.org;\n arc=pass smtp.remote-ip=209.85.217.54"],"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 4fq2jq3cK3z1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 18:36:31 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 7147C4BA9028\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  6 Apr 2026 08:36:29 +0000 (GMT)","from mail-vs1-f54.google.com (mail-vs1-f54.google.com\n [209.85.217.54])\n by sourceware.org (Postfix) with ESMTPS id 0BF024BA2E1C\n for <gcc-patches@gcc.gnu.org>; Mon,  6 Apr 2026 08:35:47 +0000 (GMT)","by mail-vs1-f54.google.com with SMTP id\n ada2fe7eead31-604fc147b7cso989749137.2\n for <gcc-patches@gcc.gnu.org>; Mon, 06 Apr 2026 01:35:46 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 7147C4BA9028","OpenDKIM Filter v2.11.0 sourceware.org 0BF024BA2E1C"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 0BF024BA2E1C","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 0BF024BA2E1C","ARC-Seal":["i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1775464547; cv=pass;\n b=N53rHVzr2t5COjz0VymH8sRsppAOIlU6pJPtDyF4cDbr6COwCGv5W9fYC4afY5qncDPRoFMey+RT/nwkU/xkCZ0kB/e2CNh/+72zQVPFtwDO7nz+mJXzjoNTatYN59lJ0y/sr6/tjJwiLYFFWF6THgZXEfsnngljm5uYQK7Z5PE=","i=1; a=rsa-sha256; t=1775464546; cv=none;\n d=google.com; s=arc-20240605;\n b=KSU5NwH0WOFg+aBSXBQenf+wuZfvQ/aW4O7p0wTmsCEDRkNyPENA6WviYt8RuS5Rtf\n bLqDY68XQXvHkEqR48Yeaq+9EuDQuqj4Kkj15JAUvN2RDGU2L8/a5VXbDiKLwMltosmJ\n hDJFGJ8pCFlT3E2ZJQibsJnNkDqPiQAu8Jqxbh6kLxNiZfPZAoLuf3iyDkTxbHNAvdcY\n Mvv5k86wIBmyECXvFgec94Yz29ayvJjbfU6dZWK+2ztsxU5qIbECRCYRB8sXziSNYgef\n 4g9knx0M2lfIOBJC+BBvEowwmUbeVB1sIHcMnLI+yit1NKTw9ZqqiPhmDzVEHSkqpSq9\n z/8g=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775464547; c=relaxed/simple;\n bh=g1x/NhAhdq9oJn6soacBqxo8VDGle2Qcu+X5xuLwsS4=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=Oq9vlhw6keF+8B0b50gFdqZQH5+EKQKHWIP/a/BRE78y93464/gUmWIihsWht5k7qpLuEVQ7fhF/EFW6Hqz3iPwcMpxlDCDmttrzRMbuCkwOZ4idu4e6toECQE0JdifhpPml4oo6JwcFwX8e5SIC+AlomOQ3v0wiPzd606lCsd8=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:dkim-signature;\n bh=KU8sZu7pzYFGTxCDUp3JGkwiI5ffW3vDu5W7O/cYiIQ=;\n fh=t7mytMO4Ki5wsOrsB3NR5Oc+fLAV2qYiTq2+mhxW7h0=;\n b=itUsu4ZVeD3n4kc9GQmLDHKxEpPfIvjmBIhus6ITZ4XpJ6H2AdnvKd1hwXLdMioH+y\n bvgnvlyYrKq5p2VkiWjHd0/wt2qIqGG7+ODRRmwhvdxkqjFn7rgmqpkvxaoxVtZAC8LG\n MMBQu3pMnrGAh3+iUTcNf3qhO/dln0b8rt3FOX04Ax+e6D48ZDjiX5rEnM4osDbOVoiq\n SSCMAndv+jHEFiVwi09mlsitwzuxM2gvbIosRpi0Y7dtvvh7m+U47OJyCPPrEIYzx/cl\n 2Hr9X+9pr7j9FUBCCM1TrDIYHN3vQnmXfgpnnWWyORUQU2chw/Zwp3NxQ5rIiQMZcRu+\n 7fMQ==; darn=gcc.gnu.org"],"ARC-Authentication-Results":["i=2; server2.sourceware.org","i=1; mx.google.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775464546; x=1776069346; darn=gcc.gnu.org;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:from:to:cc:subject:date:message-id:reply-to;\n bh=KU8sZu7pzYFGTxCDUp3JGkwiI5ffW3vDu5W7O/cYiIQ=;\n b=j83OlyTOB7w4GIfJtAIR635VBMc+wNw7Y0lzQ7HG+m0zTMPHTJbMBFU6uPbZlfHgPH\n 37BB7NZONSe1Z+EFbFm3gPfa9o3m+dW0FhHuJafdhYVcvH4OHps3NP+UFQpUKTCRdkA7\n 040IibCV+PVnJC0BEwlwr/SksIZ7FuBbU31WoPXvC6U65a8ex0DOEoegWHBPl6YdnOUE\n vtFwvdBZrKfvXvny0t4eE6auhxtDlnlgWRzjlK3ohTkkdbTGmuFDNRID8j0MIdCiL2pP\n vMeNrTZ6PltIHDsblUB7Dq27IGSU4P/T5VV4mttfHNXy5tbd3lXyUegXn+i5+bd6rg3i\n FMSg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775464546; x=1776069346;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=KU8sZu7pzYFGTxCDUp3JGkwiI5ffW3vDu5W7O/cYiIQ=;\n b=ltjvlQ1JHMB/eHL6cn+YftLMnVFHEMt+QNxbBiYQ0BqC9SX5LR3BCrFWLKJWWLiep1\n 0mru0z4+pYEskwtxLLirYCvr3YpBfwePvjmUKkTgPXSU9E7b792q9HRy3uMjDNn7LR7W\n dG5mDqATJafzKe4iKaDhgMQ0AD31bo27+ktO6kjEoED1jzCydUM8G49pZE/bIJlvuUFJ\n QWtZIk3ZRQKAEV/CLLB79qKxqBg+SASsIagn2lPX/mEYOgRV5Gz6Dj67oayLncDr2Gah\n e8GKUcELRTgW5F+XiwiQTqSGqU0Is/NMNV1ZXhKF/y1Nijvzu/DM0pddJOVK7ea5EDOq\n 0org==","X-Forwarded-Encrypted":"i=1;\n AJvYcCXIHxQ5G22K72WyDbZZVAmjGEFkJ9WfJZ18eBiqlA1lAcwp+z2wDNM7sBk8WvYFjD4ZVvomyBSXEW6j6g==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YyXGUmJEgLX6xFVPlxJmxO5l1UV6QI3ujO/ojnC0g0FaFw2Z3aa\n tH8i5HMePSEfI9ss0gf8Z//0yC831xVaSv3L6rBj+TlE57iZIksT44OMxBu7NZPz7NzB2WMnjri\n qDRgl00DzIqL1q7m9kIdTud2FTnnpmHA=","X-Gm-Gg":"AeBDiethGS+l6JupW3m/ZBq44I87lSRTN5Wozlb1MYTqwUkNCZicFf0wOvfJJgT8Wef\n FNY3YMCgprxjnfFF6Q7tObBAAQiL/NHeJYTZVSy6zjKfoEaWmjHLA/8Qu5Xw9qshNLy0XmKPlNJ\n uBVRbP/q8O9zV7/48Q8V8u6nuFce7NgxEeu4Fhwzn2M18JObCPfA5OSvjjgQrt0EZ49QOonq9OR\n RIKxFke/LGtElOqrhSIECPji69yCv0HGjI1DVfCe1gDQzDgaxS+PFJsGcjLd3boH8mr5cERfBDM\n VqPDy9MbEyd+360BBUUZrdFZnQp7YCJjhEmQ7uNB40VL0ftd1Je5","X-Received":"by 2002:a05:6102:358d:b0:605:2ccf:49a3 with SMTP id\n ada2fe7eead31-605a5166d94mr3499233137.32.1775464546237; Mon, 06 Apr 2026\n 01:35:46 -0700 (PDT)","MIME-Version":"1.0","References":"\n <CAKvuMXCT6BdqR2hv3GGbzQEiTyd=nR_127HHFSug97asAQnBbw@mail.gmail.com>\n <20260405123322.3064791-2-ivan.lazaric1@gmail.com>\n <CAKiTkyQAZEP0y2ZsRnx7J8Rg2DCQBezTpzFKgDPD3RnuuPEi8g@mail.gmail.com>\n <CA+hF1rVkriDof6pkg3jxK5C9iniph3BzWh8BNkhpdqeo+BZ3uQ@mail.gmail.com>","In-Reply-To":"\n <CA+hF1rVkriDof6pkg3jxK5C9iniph3BzWh8BNkhpdqeo+BZ3uQ@mail.gmail.com>","From":"=?utf-8?q?Daniel_Kr=C3=BCgler?= <daniel.kruegler@gmail.com>","Date":"Mon, 6 Apr 2026 10:35:37 +0200","X-Gm-Features":"AQROBzCD45VtZqN5-cQu1FXYoMtgOxrG7QjtQrH-UAnHYe4vc3AFqLh9YQACG_8","Message-ID":"\n <CAGNvRgDQQhpmhy4nLEEwhF9tEfPJQn=qLykDJjopuzFWpLAb+g@mail.gmail.com>","Subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","To":"Ivan Lazaric <ivan.lazaric1@gmail.com>","Cc":"Matthias Wippich <mfwippich@gmail.com>, tkaminsk@redhat.com,\n libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","Content-Type":"multipart/alternative; boundary=\"00000000000096ffd3064ec68dc6\"","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"}},{"id":3673792,"web_url":"http://patchwork.ozlabs.org/comment/3673792/","msgid":"<CA+hF1rXgyJVnYfAN-OS5SdnLvgm6rHc=Yp0CguEW+FBZj7rgyA@mail.gmail.com>","list_archive_url":null,"date":"2026-04-06T16:22:10","subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","submitter":{"id":92628,"url":"http://patchwork.ozlabs.org/api/people/92628/","name":"Ivan Lazaric","email":"ivan.lazaric1@gmail.com"},"content":"I don’t think CWG3135 is sufficient for the template for snippet\n\nIn following snippets assume type S is basically std::make_index_sequence<1>\n\ntemplate for version:\n\n  { // version 1\n    template for (constexpr auto index : S{}) { }\n  }\n\nDesugared through https://eel.is/c++draft/stmt.expand#5.3 :\n\n  { // version 2\n    constexpr auto&& [a] = S{};\n  }\n\nDesugared and trimmed, https://eel.is/c++draft/dcl.struct.bind#1 :\n\n  { // version 3\n    constexpr auto&& foo = S{};\n  }\n\nThe last one is not affected by CWG3135, and fails to compile, because the\nmaterialized temporary is not constexpr\nhttps://godbolt.org/z/s18G5G657\n\nOn Mon, Apr 6, 2026 at 10:35 AM Daniel Krügler <daniel.kruegler@gmail.com>\nwrote:\n\n> Am So., 5. Apr. 2026 um 22:49 Uhr schrieb Ivan Lazaric <\n> ivan.lazaric1@gmail.com>:\n>\n>> Clarifying, I implemented this for myself locally because it was useful\n>> in some reflection related code. I searched through my email for\n>> patches for this proposal, but it seems I haven’t been subscribed for long\n>> enough to find yours. It seemed simple enough so I cleaned it up a bit\n>> and posted.\n>>\n>> You seem to have better understanding of the general situation here,\n>> so IMO it would be better for me to drop the work and let you continue.\n>> If you wish to use any snippets from what I posted, feel free.\n>>\n>> I built locally with Jakubs patch, and the noted failures now pass.\n>> Something that still fails though, which is explicitly mentioned in paper:\n>>\n>>     template for (constexpr auto index : std::make_index_sequence<20>{})\n>>         static_assert( index + 1 ); // error, not a constant expression\n>>\n>> Desugared a bit (also fails):\n>>\n>>   {\n>>     constexpr auto&& [a, b, c] = std::make_index_sequence<3>{};\n>>\n>>     static_assert( a == 0 );\n>>     static_assert( b == 1 );\n>>     static_assert( c == 2 );\n>>   }\n>>\n>> Please verify this, as I could be missing some patches\n>>\n> This is CWG 3135 (\n> https://cplusplus.github.io/CWG/issues/cwg_active.html#3135), which was\n> accepted in Croydon, but presumably not yet  implemented in gcc.\n>\n> - Daniel\n>\n>\n>>\n>> On Sun, Apr 5, 2026 at 8:33 PM Matthias Wippich <mfwippich@gmail.com>\n>> wrote:\n>>\n>>> >Will post an updated patch, but wouldn’t pre-CWG3135 wording also work,\n>>> due to lifetime extension?\n>>> Without the changes from cwg3135, this cannot interact well with p2686\n>>> constexpr structured bindings. The non-constexpr case should be fine.\n>>> That's very unfortunate since the intended use is with p2686 constexpr\n>>> bindings + p1061 pack-introducing bindings - therefore, implementing\n>>> p1789 without first addressing cwg3135 seems moot to me.\n>>>\n>>> As Tomasz mentioned, I already submitted a patch for this end of last\n>>> year but waited to see whether we fix p1789 by addressing the core\n>>> language defect or by changing the library specification instead.\n>>> Since cwg3135 is accepted now, I was going to update it as soon as\n>>> Jakub's patch for cwg3135 from 2 days ago is merged (so tests pass).\n>>>\n>>> Since your patch seems to be in better shape than mine, I do not mind\n>>> abandoning the previous patch in favor of this one. @Tomasz: Which one\n>>> do you want to go ahead with? Does the release target change depending\n>>> on which one is used or is it going to be GCC 17 either way?\n>>>\n>>>\n>>>\n>>> On Sun, Apr 5, 2026 at 1:38 PM Ivan Lazaric <ivan.lazaric1@gmail.com>\n>>> wrote:\n>>> >\n>>> > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p1789r3.pdf\n>>> >\n>>> > P1789 enables accessing the sequence values through structured\n>>> bindings.\n>>> > ```\n>>> > auto [...values] = std::make_index_sequence<10>{};\n>>> > // values is a pack of size 10, and elements 0, 1, 2, ..., 9\n>>> > ```\n>>> >\n>>> > Corresponding C++ draft commit:\n>>> 3d71a838ed2a1689dd329f964ec4d58152487151\n>>> > Feature-test macro integer_sequence has been bumped to 202511L.\n>>> >\n>>> > libstdc++-v3/ChangeLog:\n>>> >\n>>> >         * include/bits/utility.h:\n>>> >         Implement structured bindings protocol for\n>>> std::integer_sequence.\n>>> >         * include/bits/version.def: Bump integer_sequence feature-test\n>>> macro.\n>>> >         * include/bits/version.h: Regenerate.\n>>> >         * testsuite/20_util/integer_sequence/structured_binding.cc:\n>>> New test.\n>>> >\n>>> > Signed-off-by: Ivan Lazaric <ivan.lazaric1@gmail.com>\n>>> > ---\n>>> > Fixed a missing `std::` on `size_t` , thanks Linaro.\n>>> > Extended the test.\n>>> >\n>>> > Only part that fails is the last block in `test_basic()`\n>>> > I am pretty sure that's because of:\n>>> > ```\n>>> > static constexpr int&& x = 1;\n>>> > static_assert(x == 1); // fails, would've worked if it was `const\n>>> int&&` or `const int&`\n>>> > ```\n>>> >\n>>> > https://godbolt.org/z/jM18sv5nh\n>>> >\n>>> >  libstdc++-v3/include/bits/utility.h           | 28 ++++++++\n>>> >  libstdc++-v3/include/bits/version.def         |  5 ++\n>>> >  libstdc++-v3/include/bits/version.h           |  7 +-\n>>> >  .../integer_sequence/structured_binding.cc    | 72 +++++++++++++++++++\n>>> >  4 files changed, 111 insertions(+), 1 deletion(-)\n>>> >  create mode 100644\n>>> libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>>> >\n>>> > diff --git a/libstdc++-v3/include/bits/utility.h\n>>> b/libstdc++-v3/include/bits/utility.h\n>>> > index bd6b18d54dd..159884dd814 100644\n>>> > --- a/libstdc++-v3/include/bits/utility.h\n>>> > +++ b/libstdc++-v3/include/bits/utility.h\n>>> > @@ -150,6 +150,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n>>> >        static constexpr size_t size() noexcept { return\n>>> sizeof...(_Idx); }\n>>> >      };\n>>> >\n>>> > +#if __glibcxx_integer_sequence >= 202511L // C++ >= 26\n>>> > +    template<typename _Tp, _Tp... _Idx>\n>>> > +      struct tuple_size<integer_sequence<_Tp, _Idx...>>\n>>> > +      : integral_constant<size_t, sizeof...(_Idx)> { };\n>>> > +\n>>> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n>>> > +      struct tuple_element<__i, integer_sequence<_Tp, _Idx...>>\n>>> > +      {\n>>> > +       static_assert(__i < sizeof...(_Idx));\n>>> > +       using type = _Tp;\n>>> > +      };\n>>> > +\n>>> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n>>> > +      struct tuple_element<__i, const integer_sequence<_Tp, _Idx...>>\n>>> > +      {\n>>> > +       static_assert(__i < sizeof...(_Idx));\n>>> > +       using type = _Tp;\n>>> > +      };\n>>> > +\n>>> > +    template<size_t __i, class _Tp, _Tp... _Idx>\n>>> > +      constexpr _Tp\n>>> > +      get (integer_sequence<_Tp, _Idx...>) noexcept\n>>> > +      {\n>>> > +       static_assert(__i < sizeof...(_Idx));\n>>> > +       return _Idx...[__i];\n>>> > +      }\n>>> > +#endif // __glibcxx_integer_sequence >= 202511L\n>>> > +\n>>> >    /// Alias template make_integer_sequence\n>>> >    template<typename _Tp, _Tp _Num>\n>>> >      using make_integer_sequence\n>>> > diff --git a/libstdc++-v3/include/bits/version.def\n>>> b/libstdc++-v3/include/bits/version.def\n>>> > index 1265f01757c..81ec5723844 100644\n>>> > --- a/libstdc++-v3/include/bits/version.def\n>>> > +++ b/libstdc++-v3/include/bits/version.def\n>>> > @@ -184,6 +184,11 @@ ftms = {\n>>> >\n>>> >  ftms = {\n>>> >    name = integer_sequence;\n>>> > +  values = {\n>>> > +    v = 202511;\n>>> > +    cxxmin = 26;\n>>> > +    extra_cond = \"__cpp_pack_indexing\";\n>>> > +  };\n>>> >    values = {\n>>> >      v = 201304;\n>>> >      cxxmin = 14;\n>>> > diff --git a/libstdc++-v3/include/bits/version.h\n>>> b/libstdc++-v3/include/bits/version.h\n>>> > index 00f352089f7..cde4fa839db 100644\n>>> > --- a/libstdc++-v3/include/bits/version.h\n>>> > +++ b/libstdc++-v3/include/bits/version.h\n>>> > @@ -186,7 +186,12 @@\n>>> >  #undef __glibcxx_want_exchange_function\n>>> >\n>>> >  #if !defined(__cpp_lib_integer_sequence)\n>>> > -# if (__cplusplus >= 201402L)\n>>> > +# if (__cplusplus >  202302L) && (__cpp_pack_indexing)\n>>> > +#  define __glibcxx_integer_sequence 202511L\n>>> > +#  if defined(__glibcxx_want_all) ||\n>>> defined(__glibcxx_want_integer_sequence)\n>>> > +#   define __cpp_lib_integer_sequence 202511L\n>>> > +#  endif\n>>> > +# elif (__cplusplus >= 201402L)\n>>> >  #  define __glibcxx_integer_sequence 201304L\n>>> >  #  if defined(__glibcxx_want_all) ||\n>>> defined(__glibcxx_want_integer_sequence)\n>>> >  #   define __cpp_lib_integer_sequence 201304L\n>>> > diff --git\n>>> a/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>>> b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>>> > new file mode 100644\n>>> > index 00000000000..18cbcae53e5\n>>> > --- /dev/null\n>>> > +++\n>>> b/libstdc++-v3/testsuite/20_util/integer_sequence/structured_binding.cc\n>>> > @@ -0,0 +1,72 @@\n>>> > +// { dg-do compile { target c++26 } }\n>>> > +\n>>> > +#include <utility>\n>>> > +#include <testsuite_hooks.h>\n>>> > +\n>>> > +#if __cpp_lib_integer_sequence < 202511L\n>>> > +# error \"Feature-test macro __cpp_lib_integer_sequence is incorrect\"\n>>> > +#endif\n>>> > +\n>>> > +constexpr auto\n>>> > +destructure_sum(auto seq)\n>>> > +{\n>>> > +  auto [...elems] = seq;\n>>> > +  return (0 + ... + elems);\n>>> > +}\n>>> > +\n>>> > +using IS1 = std::make_index_sequence<10>;\n>>> > +static_assert( std::tuple_size_v<IS1> == 10 );\n>>> > +static_assert( std::is_same_v<std::tuple_element_t<3, IS1>,\n>>> std::size_t> );\n>>> > +static_assert( std::get<7>(IS1{}) == 7 );\n>>> > +static_assert( destructure_sum(IS1{}) == 45 );\n>>> > +\n>>> > +using IS2 = std::integer_sequence<int, 42, 101, -13>;\n>>> > +static_assert( std::tuple_size_v<IS2> == 3 );\n>>> > +static_assert( std::is_same_v<std::tuple_element_t<1, IS2>, int> );\n>>> > +static_assert( std::get<2>(IS2{}) == -13 );\n>>> > +static_assert( destructure_sum(IS2{}) == 130 );\n>>> > +\n>>> > +using IS3 = std::integer_sequence<char>;\n>>> > +static_assert( std::tuple_size_v<IS3> == 0 );\n>>> > +\n>>> > +template<typename = void>\n>>> > +constexpr bool\n>>> > +test_basic()\n>>> > +{\n>>> > +  {\n>>> > +    auto [...elems] = std::make_index_sequence<10>{};\n>>> > +\n>>> > +    static_assert( sizeof...(elems) == 10 );\n>>> > +\n>>> > +    VERIFY( elems...[0] == 0 );\n>>> > +    VERIFY( elems...[3] == 3 );\n>>> > +    VERIFY( elems...[9] == 9 );\n>>> > +  }\n>>> > +\n>>> > +  {\n>>> > +    auto [...elems] = std::integer_sequence<int, 3, 5, 7, 11>{};\n>>> > +\n>>> > +    static_assert( sizeof...(elems) == 4 );\n>>> > +\n>>> > +    VERIFY( elems...[0] == 3 );\n>>> > +    VERIFY( elems...[1] == 5 );\n>>> > +    VERIFY( elems...[2] == 7 );\n>>> > +    VERIFY( elems...[3] == 11 );\n>>> > +  }\n>>> > +\n>>> > +  {\n>>> > +    static constexpr auto [...elems] = std::integer_sequence<short,\n>>> 2, 4, 8, 16>{};\n>>> > +\n>>> > +    static_assert( sizeof...(elems) == 4 );\n>>> > +\n>>> > +    // these fail\n>>> > +    static_assert( elems...[0] == 2 );\n>>> > +    static_assert( elems...[1] == 4 );\n>>> > +    static_assert( elems...[2] == 8 );\n>>> > +    static_assert( elems...[3] == 16 );\n>>> > +  }\n>>> > +\n>>> > +  return true;\n>>> > +}\n>>> > +\n>>> > +static_assert( test_basic() );\n>>> > --\n>>> > 2.43.0\n>>> >\n>>>\n>>","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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=mCj40/jp;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=mCj40/jp","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","sourceware.org; spf=pass smtp.mailfrom=gmail.com","server2.sourceware.org;\n arc=pass smtp.remote-ip=209.85.216.46"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4fqF4G5knnz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 02:23:09 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 800844BA23E2\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  6 Apr 2026 16:23:07 +0000 (GMT)","from mail-pj1-f46.google.com (mail-pj1-f46.google.com\n [209.85.216.46])\n by sourceware.org (Postfix) with ESMTPS id 14D124BA2E1C\n for <gcc-patches@gcc.gnu.org>; Mon,  6 Apr 2026 16:22:24 +0000 (GMT)","by mail-pj1-f46.google.com with SMTP id\n 98e67ed59e1d1-35d9923eec5so2417412a91.2\n for <gcc-patches@gcc.gnu.org>; Mon, 06 Apr 2026 09:22:24 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 800844BA23E2","OpenDKIM Filter v2.11.0 sourceware.org 14D124BA2E1C"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 14D124BA2E1C","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 14D124BA2E1C","ARC-Seal":["i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1775492544; cv=pass;\n b=MPSj6Cp9TvBcsTTZMxW3tR0iYP2YMIETVVYS2hb2wBuNKH1XeC3LVpavSJVU+fj33WeioUiE7CiuS6OoH2YmB3STZq2C2CHMRdlE7OoJs4lLZGdWT56m9rL1eNX9UaIT9E3ys+TZSOBr601L6ttkjeN2/V7gYAmrRIO5M9t82Ck=","i=1; a=rsa-sha256; t=1775492543; cv=none;\n d=google.com; s=arc-20240605;\n b=X/cc1vrq3uCQGcisKiP7j1k0jBabMkHd1hZ4sF3Sr13HDJqAJ7miYfO4lxe4ng0SVS\n tBZhUdX5/i+Wd4giTL/UednFrLJlgFdjpilC51S86duVUReRDtjpyWo4NjDQfaM55Yk0\n 4DIx/Vq/It253dtVS9zpL8bKnGuJX6TjCa0YuWh8n3OHXdWjGOXiSbpk5x2om10e1yDE\n Qi58uQ0LtMV0YekGKNKcgilPftV9Bd23KM9nud1KcJ/cZe+UDowY9bOH30g/08AlBzlB\n CzkLY3GRXUfczthyv4neQ0MZ0EEeILgLA+fIQ9MbTFb8dVzdo4Vaj+veUYl+jG347hO1\n oxJg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775492544; c=relaxed/simple;\n bh=AwSx9UjiP2smwls/LyV5L5dB3l/s/8LlWW9DjP5O1d8=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=jYIijNQGe1oq+9SY8ZH/YHdSRMdmo7ODRGjKvqer7vO3rV85KdJNv1wcWd92IUf+poYsH6WLsYaemALu9m9eOm7sXxnvPSZ0cJu2dLo+uWf3lleRF3ml+/MhA6ydynSTAHEeud9BQzJ5dLU5W/MkUqeiLzxaH49v6644dtMocAw=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:dkim-signature;\n bh=2jkWeWHDMR9eNZi+nnJTr4S6zw8ScOBd2HHbd+sMgX0=;\n fh=+SgNuaHlOCh8MGW/uwXpS0HphCGYbbHVYaT4m341ZkI=;\n b=CalY3WfvBqrk2+llHKui+P+b4m8NgfGCOiBqVbvjKV62MA0v+gigprDZrjAIXQk4tt\n KNKw3eZtUUR8Tk5gd8sfyuT7zIiQ7Br0RW4US/G+i+zQ876LzxAHrKDyUvIjTVPbYrzx\n zfPRVyDWZG39OO312tpM7fC5sa2l7gxDDj4+lfzR/K9eIxJRnNnzF4O4PH6PouTF2dcJ\n H4IxuEnADLXstccBf+KtYLprCvMbwkXzc45FHJkIh03qoQL6k6BxdgTfkGGdszUVL76T\n PMbOtZ0pyBNRU80hVqdcCfV5tI1xf9xJvAPQ0RKr/GR/MRT1kASFvkmNHUpO6PcdwYMD\n lIYA==; darn=gcc.gnu.org"],"ARC-Authentication-Results":["i=2; server2.sourceware.org","i=1; mx.google.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775492543; x=1776097343; darn=gcc.gnu.org;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:from:to:cc:subject:date:message-id:reply-to;\n bh=2jkWeWHDMR9eNZi+nnJTr4S6zw8ScOBd2HHbd+sMgX0=;\n b=mCj40/jpVXz6k9kfId1qNOQheRN8ztYrbCVdB0vjPSgdpZxi5blYh9oahBr+Fes+1/\n 9Va6uNevZvyT1ln5baj1LMlB2KIEh09bH44g77EClVCL318G8JcJgGqRHSWynp2GdMxe\n hcfsvpnR6cgvEUsfTJVGMYGTiAh++dUmTv4ug3OR9eon3QWJA7tWdYdSVnpwLZqWIP0x\n 33fnv7SzVA2LxVzCFMViQtdF4xRJVG23nqT0YeSatIElD1W3q8bMzeq4WBz9qF0upJC4\n PjWiuQgRpIXS5t+O2ndlWpcTsxv3SqfrSjWWTLN5wp+pcFp7k8DjH+CpYmOxoNDCe03S\n eyQA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775492543; x=1776097343;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=2jkWeWHDMR9eNZi+nnJTr4S6zw8ScOBd2HHbd+sMgX0=;\n b=hWL8RYUHvz9exF0zs36wZ1ufM4g5j/+Slc+GzrCpTIGxd6KYz2rTI8AnSQh+MO3avs\n x3VvHZ02hPTEqH0Pw+g6z2nOTrv9oPlWzH2OYE3RKELEpYMfSgMIWXwFqpp32tU6UoGB\n p66NbOc1NvJZVkDOmsf7RXpJUnvHTtPgUJHXhvhH+M9jsEzq7HT6c+95KYyuF3hgGoiB\n 8rvnueZ7BKNwDUh0IJ+llIwSH7tqowBdq7vB8jd8920rvduCi9K2Fx/ImjDHVFH4+Vml\n d7zZaPV9V63qan6sDzYRDRcChf0P1eATO6W8+IkZaSqUBziD3PU6Zd0fkaxrqa6mEhL+\n wZhg==","X-Forwarded-Encrypted":"i=1;\n AJvYcCUhFmR6H21GmWceT17bFjdkCZojf8qBtVTb6Flx9Hf2tPXO6cewRJzYODPOnjmnu29YZ/ycKGgaczA9Rw==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YymGF72n3VZ0JxeoobickSXs5q2CaOZBMdGC++E7e5MiEM8B+al\n YujTrCYwzsDwg7KiOCmE6VS2ZG8biIJy2h9rHhRfx/wrc9+A06Ve9/03wGTXA/rfLKB7QpUzPQC\n VbJRadQNZgOxIhr5pWs6RVmO7/wgSYfuGUYinkQI=","X-Gm-Gg":"AeBDiesI6FPiMfs1nqAXBPOFHPmQ3+VQpD2+mvhXnYTv3wadMqQBiZuWgHueYOqrlz1\n u7p3bknFruw1PcLOP+RNRhfLGaJKFx0/6YvBz/mQg4pi+7Cc97H6RNShxlO7Jox5yisladhfB2W\n j2d0qDeRUSup05/JFLhODKlWvykEDXAUTleI8OP7ryBzNfJHwZb8umWjZZMS2RJ+52Ue30pK06K\n 0dSuvCNl58GMn2uvgGCifqna0Jym9dc2b+T7VVnXyfUos9JlyKACfqBZo04eJFB8pZ5JAp7Ot3e\n sLe1nzCUKPUJrmuoJIgMa7BBCKqB3pEBwU2mYTCjLG3QrzzPQjr2K1XiEOAdrKV5X8LKfaV2bCi\n 41zzmXSuraMs+CcTb0Ib2feoptYxYlp6rr8+pGYo058F+4aXd4W77TRQEuNxg/jbg39LZkA==","X-Received":"by 2002:a17:90b:1d8b:b0:35b:93d8:6aaf with SMTP id\n 98e67ed59e1d1-35de6973f85mr11280854a91.19.1775492542373; Mon, 06 Apr 2026\n 09:22:22 -0700 (PDT)","MIME-Version":"1.0","References":"\n <CAKvuMXCT6BdqR2hv3GGbzQEiTyd=nR_127HHFSug97asAQnBbw@mail.gmail.com>\n <20260405123322.3064791-2-ivan.lazaric1@gmail.com>\n <CAKiTkyQAZEP0y2ZsRnx7J8Rg2DCQBezTpzFKgDPD3RnuuPEi8g@mail.gmail.com>\n <CA+hF1rVkriDof6pkg3jxK5C9iniph3BzWh8BNkhpdqeo+BZ3uQ@mail.gmail.com>\n <CAGNvRgDQQhpmhy4nLEEwhF9tEfPJQn=qLykDJjopuzFWpLAb+g@mail.gmail.com>","In-Reply-To":"\n <CAGNvRgDQQhpmhy4nLEEwhF9tEfPJQn=qLykDJjopuzFWpLAb+g@mail.gmail.com>","From":"Ivan Lazaric <ivan.lazaric1@gmail.com>","Date":"Mon, 6 Apr 2026 18:22:10 +0200","X-Gm-Features":"AQROBzCNMdzQpdA-21XK7c2OdUg30Uhv_LWZRcwPTtsQC10d9vOgNXDPta53dQ8","Message-ID":"\n <CA+hF1rXgyJVnYfAN-OS5SdnLvgm6rHc=Yp0CguEW+FBZj7rgyA@mail.gmail.com>","Subject":"Re: [PATCH] libstdc++: Implement P1789R3: structured bindings for\n std::integer_sequence","To":"=?utf-8?q?Daniel_Kr=C3=BCgler?= <daniel.kruegler@gmail.com>","Cc":"Matthias Wippich <mfwippich@gmail.com>, tkaminsk@redhat.com,\n libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","Content-Type":"multipart/alternative; boundary=\"0000000000004a264d064ecd12a1\"","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"}}]