[{"id":3677758,"web_url":"http://patchwork.ozlabs.org/comment/3677758/","msgid":"<74a60da4-10cb-4cd8-8a01-2e564b54b8e3@redhat.com>","list_archive_url":null,"date":"2026-04-15T16:26:14","subject":"Re: [PATCH] c++/reflection: generic lambda with dependent splice\n [PR123783]","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/","name":"Jason Merrill","email":"jason@redhat.com"},"content":"On 4/15/26 12:11 PM, Marek Polacek wrote:\n> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?\n\nOK.\n\nIt might be nice to somehow refer to the rule that makes this explicitly \nill-formed:\n\nhttps://eel.is/c++draft/expr#prim.splice-2.1.4.1\n\n> -- >8 --\n> For a generic lambda, we normally collect the captures while parsing\n> the lambda: finish_id_expression calls process_outer_var_ref which does\n> add_capture.  Then when instantiating, we'll find the capture via\n> retrieve_local_specialization.  Once the closure type has been\n> finalized, it's frozen and we can't add new fields.  This is what\n> happens in the following test though, which is the reason we crash:\n> \n>    [&]<auto> {\n>      [:e:];\n>    }\n> \n> where while parsing we can't know what the splice will designate.\n> We'll only find out after we've substituted the splice but then it's\n> too late to capture anything.\n> \n> A possible solution would be to speculatively capture all locals when\n> we see a dependent splice in a generic lambda.  But since this test is\n> invalid anyway, that would be a lot of work for no good reason.  So this\n> patch changes the internal_error to an ordinary error.\n> \n> \tPR c++/123783\n> \n> gcc/cp/ChangeLog:\n> \n> \t* lambda.cc (add_capture): When trying to capture something in\n> \tan instantiation of generic lambda, give an error instead of an ICE.\n> \n> gcc/testsuite/ChangeLog:\n> \n> \t* g++.dg/reflect/dep14.C: New test.\n> \t* g++.dg/reflect/dep15.C: New test.\n> ---\n>   gcc/cp/lambda.cc                     |  7 +++--\n>   gcc/testsuite/g++.dg/reflect/dep14.C | 44 ++++++++++++++++++++++++++++\n>   gcc/testsuite/g++.dg/reflect/dep15.C | 44 ++++++++++++++++++++++++++++\n>   3 files changed, 93 insertions(+), 2 deletions(-)\n>   create mode 100644 gcc/testsuite/g++.dg/reflect/dep14.C\n>   create mode 100644 gcc/testsuite/g++.dg/reflect/dep15.C\n> \n> diff --git a/gcc/cp/lambda.cc b/gcc/cp/lambda.cc\n> index e1ff304ffe8..bf9eda573e1 100644\n> --- a/gcc/cp/lambda.cc\n> +++ b/gcc/cp/lambda.cc\n> @@ -729,8 +729,11 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p,\n>         && current_class_type == LAMBDA_EXPR_CLOSURE (lambda))\n>       {\n>         if (COMPLETE_TYPE_P (current_class_type))\n> -\tinternal_error (\"trying to capture %qD in instantiation of \"\n> -\t\t\t\"generic lambda\", id);\n> +\t{\n> +\t  error (\"trying to capture %qD in instantiation of generic lambda\",\n> +\t\t id);\n> +\t  return error_mark_node;\n> +\t}\n>         finish_member_declaration (member);\n>       }\n>   \n> diff --git a/gcc/testsuite/g++.dg/reflect/dep14.C b/gcc/testsuite/g++.dg/reflect/dep14.C\n> new file mode 100644\n> index 00000000000..e9464e529b2\n> --- /dev/null\n> +++ b/gcc/testsuite/g++.dg/reflect/dep14.C\n> @@ -0,0 +1,44 @@\n> +// PR c++/123783\n> +// { dg-do compile { target c++26 } }\n> +// { dg-additional-options \"-freflection\" }\n> +\n> +#include <meta>\n> +\n> +namespace __impl {\n> +  template<auto... vals>\n> +  struct replicator_type {\n> +    template<typename F>\n> +      constexpr void operator>>(F body) const {\n> +        (body.template operator()<vals>(), ...);\n> +      }\n> +  };\n> +\n> +  template<auto... vals>\n> +  replicator_type<vals...> replicator = {};\n> +}\n> +\n> +template<typename R>\n> +consteval auto expand(R range) {\n> +  std::vector<std::meta::info> args;\n> +  for (auto r : range) {\n> +    args.push_back(reflect_constant(r));\n> +  }\n> +  return substitute(^^__impl::replicator, args);\n> +}\n> +\n> +int func(int counter, float factor) {\n> +    std::array<void *, parameters_of(^^func).size()> args;\n> +\n> +    std::size_t i = 0;\n> +    [:expand(parameters_of(^^func)):] >> [&]<auto e>\n> +    {\n> +        args[i++] = &[:e:]; // { dg-error \"use of local variable|trying to capture \\[^\\n\\r]* in instantiation of generic lambda\" }\n> +    };\n> +    return 0;\n> +}\n> +\n> +int main()\n> +{\n> +    func(11, 22);\n> +    func(33, 44);\n> +}\n> diff --git a/gcc/testsuite/g++.dg/reflect/dep15.C b/gcc/testsuite/g++.dg/reflect/dep15.C\n> new file mode 100644\n> index 00000000000..060c9f680ab\n> --- /dev/null\n> +++ b/gcc/testsuite/g++.dg/reflect/dep15.C\n> @@ -0,0 +1,44 @@\n> +// PR c++/123783\n> +// { dg-do compile { target c++26 } }\n> +// { dg-additional-options \"-freflection\" }\n> +\n> +#include <meta>\n> +\n> +namespace __impl {\n> +  template<auto... vals>\n> +  struct replicator_type {\n> +    template<typename F>\n> +      constexpr void operator>>(F body) const {\n> +        (body.template operator()<vals>(), ...);\n> +      }\n> +  };\n> +\n> +  template<auto... vals>\n> +  replicator_type<vals...> replicator = {};\n> +}\n> +\n> +template<typename R>\n> +consteval auto expand(R range) {\n> +  std::vector<std::meta::info> args;\n> +  for (auto r : range) {\n> +    args.push_back(reflect_constant(r));\n> +  }\n> +  return substitute(^^__impl::replicator, args);\n> +}\n> +\n> +int func(int counter, float factor) {\n> +    std::array<void *, parameters_of(^^func).size()> args;\n> +\n> +    std::size_t i = 0;\n> +    [:expand(parameters_of(^^func)):] >> [&i, &counter, &factor, &args]<auto e>\n> +    {\n> +        args[i++] = &[:e:]; // { dg-error \"use of local variable\" }\n> +    };\n> +    return 0;\n> +}\n> +\n> +int main()\n> +{\n> +    func(11, 22);\n> +    func(33, 44);\n> +}\n> \n> base-commit: 662a21e48e7820c9f8614b4eb4249cc8d1dc443d","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=cZpuTqjj;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=temperror (SPF Temporary Error: DNS Timeout) 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=cZpuTqjj","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 4fwmkt5T7Rz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 02:26:57 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id B639E4BA2E23\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 16:26:55 +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 565D84BA2E0E\n for <gcc-patches@gcc.gnu.org>; Wed, 15 Apr 2026 16:26:24 +0000 (GMT)","from mail-qv1-f72.google.com (mail-qv1-f72.google.com\n [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-43-e2EVXaSiP8GH1EpIRBjmww-1; Wed, 15 Apr 2026 12:26:22 -0400","by mail-qv1-f72.google.com with SMTP id\n 6a1803df08f44-8ae6aa148a7so29810466d6.0\n for <gcc-patches@gcc.gnu.org>; Wed, 15 Apr 2026 09:26:22 -0700 (PDT)","from [192.168.50.130]\n (130-44-146-247.s12789.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com.\n [130.44.146.247]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8ae6cda9277sm14669086d6.41.2026.04.15.09.26.20\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Wed, 15 Apr 2026 09:26:20 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org B639E4BA2E23","OpenDKIM Filter v2.11.0 sourceware.org 565D84BA2E0E"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 565D84BA2E0E","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 565D84BA2E0E","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776270384; cv=none;\n b=sXF/UsUJojOfLQ9nuzXBbjA6kju3OpB1nqscmzca/ktyJhVfqNwr4+TtWMujbUiTroX45B4GvGqLXiPEvs1TeOZJWtg0Y06fXRMnxbe/XIJN96lfCynJlWrdlGuuGCbX4u04PwqOM6w1DRAhhjLMUkPXfkfIWlD6ICPkhCLUmTc=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776270384; c=relaxed/simple;\n bh=rLcWK2pAZ978v4JPriM1XkOdt57JQOzQGiuVM4gJj/4=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;\n b=qjpZlyppjFMszp6TtIVXk36MRo4EVPmiscx6WYHoKfz075akERkAIvE3xLuqhoTnJLDvwIXzeCr3P57T6OmkQJmGCFiOxhhuP7c4guSFjaFWOHHWVXQIrEBvkltgzFb2un1RoOEcfoMML7pGyFQdLzUfLptzbzRXlw0Y/JpteJY=","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=1776270383;\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 in-reply-to:in-reply-to:references:references;\n bh=WErxvMj997t8z3ew56aC9g7ZpOnnowk0G8YplmT//k0=;\n b=cZpuTqjjkYvndFhBFsORNLyRmjM456x+rSymlIv5hID/S11w9KSaTVZf6SCgQl7KaTHhgn\n cbr2ftkUgcIF2BtgkMWFUG41Q0FpdYy3O2dyfrxFMpp4Jc0zaSWNWleFx/e5SVQyt9zon6\n XM8B2d9ZOQag7pEHIQKl+o9Rb5QKy+M=","X-MC-Unique":"e2EVXaSiP8GH1EpIRBjmww-1","X-Mimecast-MFC-AGG-ID":"e2EVXaSiP8GH1EpIRBjmww_1776270382","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776270382; x=1776875182;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=WErxvMj997t8z3ew56aC9g7ZpOnnowk0G8YplmT//k0=;\n b=jyetJMXYk6qQWf41BcvNEnwH0JkfxmMuUIh2otaWaho3+Xi+kljdFxw7NpluRARmzd\n L6nTtV1CT2kBDPkRKkQfemTPrwE3A8b/Jrri8lV0Xb6ZNVTLlapKGg3P7xBjycg3m7Rc\n aKA6x9VXdlmNmounpkrcp5PJoG1Ezq8vlb7hFlbBHgUb1YEu0jDgVjv5FxmAy5gRjTup\n 9F4LwpCLblNOkitIwOGYtpSn1kmVJfcxDjQAwcZd7CFCIdXH6e9aEPBaBlBJj6Dru969\n G8wUa6IeX3j/Dr/0P4vhj7lFyT/Xfb6/1t/fMeVNDyFEMmrmiok+Kn9GxRrHtyhMitXh\n Fq3A==","X-Forwarded-Encrypted":"i=1;\n AFNElJ8KUxCvDENiLNC2Ps2B6t6EnsyC8UtqIoSt7zLSEILp5WkI2duDeSIR0ZOtwSW4qXkQZJg4fkNmp8KOzw==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YywCIp0Vg2lwJIbzCr9yLBr+vGhqQL6sNlaRTYkjRKJQqjp26T9\n d6I/60jzmU1IFp5/YLQXLtkgoz1KJFWSrVkx9gOWjyQ8yjh4etu3yuSncNJ1i+Vd2T4/G/kY9mW\n 1vIe0MKT74Klt10zoj2wqfpPSV+Xtm/+SDCojN0YYktov43ol85+2FLH72O4=","X-Gm-Gg":"AeBDietPMbByJuLoOnaKZwzJB8F1/W2HLiihHEe19P2eom1RwKLrP7ABi1nLFcjmmbz\n AkOgrrIkXW02FUjB/RrgUNws9dg/zsOecSyllPgr6m3cAowQZU5sHHcqc6D0rkmb2IlALeOQE83\n 9RC6GrFOm6oHaKn9pDC4FRxHNHiZjBNCZxwdXybrLj63SniGPXXeWK2Ph55TFgvWe+93YZrEdc3\n U/pKp28cOZPY0gYg5o0O8Sg6AnB6ch0mIn3Lh/i6H6FMDhmJj/UhvItpkNeHf/90qzpgfTwZH/q\n vW6+r0jemSndRFKA18yWF1rZfD9u3QvHiLkkrphMJM4IqNeU/vGcKL0i0HdNf1tjk6Ts+Cb/Pmp\n 0jn4vZ1dqFCE+0KHpuTIjNJv5A8rcf6VNORaZhqBYD2G49qmHsxluPWzp7lQXsC8B5soC1Vk6oS\n Xctyku8rhTryz6Yh533jTjIwzkAlSR83nst4U5BHbGRw==","X-Received":["by 2002:a05:6214:5284:b0:89c:637a:6bb with SMTP id\n 6a1803df08f44-8ae75e798dfmr3665356d6.4.1776270381941;\n Wed, 15 Apr 2026 09:26:21 -0700 (PDT)","by 2002:a05:6214:5284:b0:89c:637a:6bb with SMTP id\n 6a1803df08f44-8ae75e798dfmr3664896d6.4.1776270381469;\n Wed, 15 Apr 2026 09:26:21 -0700 (PDT)"],"Message-ID":"<74a60da4-10cb-4cd8-8a01-2e564b54b8e3@redhat.com>","Date":"Wed, 15 Apr 2026 12:26:14 -0400","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] c++/reflection: generic lambda with dependent splice\n [PR123783]","To":"Marek Polacek <polacek@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>","References":"<20260415161149.691849-1-polacek@redhat.com>","From":"Jason Merrill <jason@redhat.com>","In-Reply-To":"<20260415161149.691849-1-polacek@redhat.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"y3wrG-ajETxnLM8Sz6RPwCBr7XL48_DlkZmkRdCqFRk_1776270382","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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":3677759,"web_url":"http://patchwork.ozlabs.org/comment/3677759/","msgid":"<cffff383-feb8-fa88-8f72-e39981035616@idea>","list_archive_url":null,"date":"2026-04-15T16:27:53","subject":"Re: [PATCH] c++/reflection: generic lambda with dependent splice\n [PR123783]","submitter":{"id":78319,"url":"http://patchwork.ozlabs.org/api/people/78319/","name":"Patrick Palka","email":"ppalka@redhat.com"},"content":"On Wed, 15 Apr 2026, Marek Polacek wrote:\n\n> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?\n> \n> -- >8 --\n> For a generic lambda, we normally collect the captures while parsing\n> the lambda: finish_id_expression calls process_outer_var_ref which does\n> add_capture.  Then when instantiating, we'll find the capture via\n> retrieve_local_specialization.  Once the closure type has been\n> finalized, it's frozen and we can't add new fields.  This is what\n> happens in the following test though, which is the reason we crash:\n> \n>   [&]<auto> {\n>     [:e:];\n>   }\n> \n> where while parsing we can't know what the splice will designate.\n> We'll only find out after we've substituted the splice but then it's\n> too late to capture anything.\n> \n> A possible solution would be to speculatively capture all locals when\n> we see a dependent splice in a generic lambda.  But since this test is\n> invalid anyway, that would be a lot of work for no good reason.  So this\n> patch changes the internal_error to an ordinary error.\n> \n> \tPR c++/123783\n> \n> gcc/cp/ChangeLog:\n> \n> \t* lambda.cc (add_capture): When trying to capture something in\n> \tan instantiation of generic lambda, give an error instead of an ICE.\n> \n> gcc/testsuite/ChangeLog:\n> \n> \t* g++.dg/reflect/dep14.C: New test.\n> \t* g++.dg/reflect/dep15.C: New test.\n> ---\n>  gcc/cp/lambda.cc                     |  7 +++--\n>  gcc/testsuite/g++.dg/reflect/dep14.C | 44 ++++++++++++++++++++++++++++\n>  gcc/testsuite/g++.dg/reflect/dep15.C | 44 ++++++++++++++++++++++++++++\n>  3 files changed, 93 insertions(+), 2 deletions(-)\n>  create mode 100644 gcc/testsuite/g++.dg/reflect/dep14.C\n>  create mode 100644 gcc/testsuite/g++.dg/reflect/dep15.C\n> \n> diff --git a/gcc/cp/lambda.cc b/gcc/cp/lambda.cc\n> index e1ff304ffe8..bf9eda573e1 100644\n> --- a/gcc/cp/lambda.cc\n> +++ b/gcc/cp/lambda.cc\n> @@ -729,8 +729,11 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p,\n>        && current_class_type == LAMBDA_EXPR_CLOSURE (lambda))\n>      {\n>        if (COMPLETE_TYPE_P (current_class_type))\n> -\tinternal_error (\"trying to capture %qD in instantiation of \"\n> -\t\t\t\"generic lambda\", id);\n> +\t{\n> +\t  error (\"trying to capture %qD in instantiation of generic lambda\",\n> +\t\t id);\n> +\t  return error_mark_node;\n> +\t}\n>        finish_member_declaration (member);\n>      }\n>  \n> diff --git a/gcc/testsuite/g++.dg/reflect/dep14.C b/gcc/testsuite/g++.dg/reflect/dep14.C\n> new file mode 100644\n> index 00000000000..e9464e529b2\n> --- /dev/null\n> +++ b/gcc/testsuite/g++.dg/reflect/dep14.C\n> @@ -0,0 +1,44 @@\n> +// PR c++/123783\n> +// { dg-do compile { target c++26 } }\n> +// { dg-additional-options \"-freflection\" }\n> +\n> +#include <meta>\n> +\n> +namespace __impl {\n> +  template<auto... vals>\n> +  struct replicator_type {\n> +    template<typename F>\n> +      constexpr void operator>>(F body) const {\n> +        (body.template operator()<vals>(), ...);\n> +      }\n> +  };\n> +\n> +  template<auto... vals>\n> +  replicator_type<vals...> replicator = {};\n> +}\n> +\n> +template<typename R>\n> +consteval auto expand(R range) {\n> +  std::vector<std::meta::info> args;\n> +  for (auto r : range) {\n> +    args.push_back(reflect_constant(r));\n> +  }\n> +  return substitute(^^__impl::replicator, args);\n> +}\n> +\n> +int func(int counter, float factor) {\n> +    std::array<void *, parameters_of(^^func).size()> args;\n> +\n> +    std::size_t i = 0;\n> +    [:expand(parameters_of(^^func)):] >> [&]<auto e>\n> +    {\n> +        args[i++] = &[:e:]; // { dg-error \"use of local variable|trying to capture \\[^\\n\\r]* in instantiation of generic lambda\" }\n> +    };\n> +    return 0;\n> +}\n> +\n> +int main()\n> +{\n> +    func(11, 22);\n> +    func(33, 44);\n> +}\n> diff --git a/gcc/testsuite/g++.dg/reflect/dep15.C b/gcc/testsuite/g++.dg/reflect/dep15.C\n> new file mode 100644\n> index 00000000000..060c9f680ab\n> --- /dev/null\n> +++ b/gcc/testsuite/g++.dg/reflect/dep15.C\n> @@ -0,0 +1,44 @@\n> +// PR c++/123783\n> +// { dg-do compile { target c++26 } }\n> +// { dg-additional-options \"-freflection\" }\n> +\n> +#include <meta>\n> +\n> +namespace __impl {\n> +  template<auto... vals>\n> +  struct replicator_type {\n> +    template<typename F>\n> +      constexpr void operator>>(F body) const {\n> +        (body.template operator()<vals>(), ...);\n> +      }\n> +  };\n> +\n> +  template<auto... vals>\n> +  replicator_type<vals...> replicator = {};\n> +}\n> +\n> +template<typename R>\n> +consteval auto expand(R range) {\n> +  std::vector<std::meta::info> args;\n> +  for (auto r : range) {\n> +    args.push_back(reflect_constant(r));\n> +  }\n> +  return substitute(^^__impl::replicator, args);\n> +}\n> +\n> +int func(int counter, float factor) {\n> +    std::array<void *, parameters_of(^^func).size()> args;\n> +\n> +    std::size_t i = 0;\n> +    [:expand(parameters_of(^^func)):] >> [&i, &counter, &factor, &args]<auto e>\n> +    {\n> +        args[i++] = &[:e:]; // { dg-error \"use of local variable\" }\n> +    };\n\nCould we combine these two nearly identical rejects-valid tests?  It'd\nshave a second or two of overall testsuite compile times since <meta> is\na rather big header.\n\n> +    return 0;\n> +}\n> +\n> +int main()\n> +{\n> +    func(11, 22);\n> +    func(33, 44);\n> +}\n> \n> base-commit: 662a21e48e7820c9f8614b4eb4249cc8d1dc443d\n> -- \n> 2.53.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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=O5kSMWaz;\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=O5kSMWaz","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","sourceware.org; spf=pass smtp.mailfrom=redhat.com","server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fwmmC3c2Pz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 02:28:27 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 5DF934BA2E23\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 16:28:25 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 649A54BA2E0E\n for <gcc-patches@gcc.gnu.org>; Wed, 15 Apr 2026 16:27:57 +0000 (GMT)","from mail-qt1-f199.google.com (mail-qt1-f199.google.com\n [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-436-te5Uoq5NNY6vSbqCTOdH1Q-1; Wed, 15 Apr 2026 12:27:55 -0400","by mail-qt1-f199.google.com with SMTP id\n d75a77b69052e-50dec198720so12522991cf.2\n for <gcc-patches@gcc.gnu.org>; Wed, 15 Apr 2026 09:27:55 -0700 (PDT)","from [2600:4040:aa66:bf00:9e8e:99ff:fed1:71f]\n ([2600:4040:aa66:bf00:9e8e:99ff:fed1:71f])\n by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8ae6c957d24sm14693906d6.12.2026.04.15.09.27.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Apr 2026 09:27:54 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 5DF934BA2E23","OpenDKIM Filter v2.11.0 sourceware.org 649A54BA2E0E"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 649A54BA2E0E","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 649A54BA2E0E","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776270477; cv=none;\n b=X3PBLYrOCPL53xqGxqOZ+2x0AVvzE3R32Q2qe7Jpo8mTlR94MXIbNPpkaFrA8gwjXBVydKeso19mhsk4tuO0j47V0wlvJFZ8Mco2kkobKDxhbDIbBNNk4D4Y/NAtTUAG19LQKV7lYybFe6uC8ihV6tTAVd7S9GAf7dT1JGHm2SQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776270477; c=relaxed/simple;\n bh=m9SYrGE6y+zBNw4qUoi6O7kKn1zFRmfAivkwIhidMGo=;\n h=DKIM-Signature:From:Date:To:Subject:Message-ID:MIME-Version;\n b=LIvFbSnBOG6UP4qC0JtdPGIA+Yy0pxlXUl0xWq5JDcqZgwWm3nBpcSZaFsQYiyYDYAYOkJAryXc+JpfPgEH1wCsYDXTKvSZgnUxYp4gQK23RC6tSYNP7QhsxIbQ12AnvhsyokUE2mddSYbBiQbX/qTF7BQmwbTvMzHnpJwfAYlg=","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=1776270477;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=LoS54vjUEL9g2mA0A/Hmdkx4W62bDQUDdEdcFk3U0mk=;\n b=O5kSMWazgXlQnSf1knw0j3Moz0nLkWkTuWbO4+4ohZIL6RVWBMsEpvHjeidOpVMMAtyiuw\n w1j5S02r8eEMyh/boZkwNocJXAGalhTA+BBXcFp9y103IBmt6BTo6SmUGQxUvGbT8QCnb5\n pPaPhkpCXNHvfOptiS0YDKTwaQzYFhU=","X-MC-Unique":"te5Uoq5NNY6vSbqCTOdH1Q-1","X-Mimecast-MFC-AGG-ID":"te5Uoq5NNY6vSbqCTOdH1Q_1776270475","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776270475; x=1776875275;\n h=mime-version:references:message-id:in-reply-to:subject:cc:to:date\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=LoS54vjUEL9g2mA0A/Hmdkx4W62bDQUDdEdcFk3U0mk=;\n b=KP2GBI9jlBDQFxgWw5SRHYuwYcPGmeWCy5Dq51s3g0rOqAApSs3woX7q9XnMPAvPXy\n 6KcmJLCe/UXsuhekIe4E14oxmsGl+B1SYylPlEgaULokLCkP3PYktPvvBrogO9G0dcy+\n IXRUs4bQshjFE2dJ98YuoiSc4IYloVJyGVvJhleijW8nvnYxK/FQaCCbGLyr9wC3lwnk\n 0G5if6xj91NeC5Rhh2Am7O1+WuMPVpC5PyJYID0DWmDgq5dKRuc1L0SnFpn/xt66JfbJ\n 3MDKchMqm6dY6j4413lrUIevMVKSGkP/2u8KrGy59S1vUsSdeuZz+1wt9Y25sMxmz47Q\n 3flQ==","X-Gm-Message-State":"AOJu0Yz0d1QYtlD/hCdgzluWj4wybaVNWrGaci3inmlpUnsAWNERVnDp\n EmjQesshkSxk56ShoEdpEqF3C1PDbEliDoWg1Riln0Rv4VlHPpGcQTqxzvSyidOhlViODshuVDj\n FgUmMuIYgfuNRbscb7csGPX7MDtZ/nYd91yFwWGj0y4TZh6bWhI3KyNyNZtE=","X-Gm-Gg":"AeBDieuKIYbfK4Cs0dXTl6A1FMRtt/jxxR7b2aKycHURInw6qoHw5T8qwFNpxyZUydG\n QIIo6xdVw9ztL8ywkeS91jwp016rx7QgZs/pIS/QNEbsAYGsgg885tVb0XAyXqVHfvN6LWI00gy\n mWldhxkU0EDSCOOh0bdWDa1IWdvUXrc4bN6JlDGHYMIhTWjW18uD9ylbsf0Wiamhlnb6Oejy6i1\n Kh002YVOQjbgnoZmKLDMZ5/LjVnzWARRf/vLMUFSwfUwTyus1Eg5kj5GnK82LkP+VpP905FcECE\n ADNTwuhn8urbUpXjGCf6+aIbnGATHqtjWVKPcypCeBTZkc4gW7klXeQQuAB6Y+u5NhkW8KSphDY\n S8yZDTE0Tv2MGeZR6Q5vvVy5ve7e6DzMKUpPuBHDiDsed0p/OuPmkCw==","X-Received":["by 2002:a05:622a:24c:b0:509:2a92:8088 with SMTP id\n d75a77b69052e-50e1a5d8ab4mr29761211cf.1.1776270475192;\n Wed, 15 Apr 2026 09:27:55 -0700 (PDT)","by 2002:a05:622a:24c:b0:509:2a92:8088 with SMTP id\n d75a77b69052e-50e1a5d8ab4mr29760981cf.1.1776270474598;\n Wed, 15 Apr 2026 09:27:54 -0700 (PDT)"],"From":"Patrick Palka <ppalka@redhat.com>","X-Google-Original-From":"Patrick Palka <patrick@idea>","Date":"Wed, 15 Apr 2026 12:27:53 -0400 (EDT)","To":"Marek Polacek <polacek@redhat.com>","cc":"GCC Patches <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>","Subject":"Re: [PATCH] c++/reflection: generic lambda with dependent splice\n [PR123783]","In-Reply-To":"<20260415161149.691849-1-polacek@redhat.com>","Message-ID":"<cffff383-feb8-fa88-8f72-e39981035616@idea>","References":"<20260415161149.691849-1-polacek@redhat.com>","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"DlGC-FyL9fkb1ejdWQOXwEPsdp7yhYaiWwGa3tUGBIo_1776270475","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=US-ASCII","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":3677764,"web_url":"http://patchwork.ozlabs.org/comment/3677764/","msgid":"<ad_CNtJdspG2OdBV@redhat.com>","list_archive_url":null,"date":"2026-04-15T16:52:06","subject":"Re: [PATCH] c++/reflection: generic lambda with dependent splice\n [PR123783]","submitter":{"id":14370,"url":"http://patchwork.ozlabs.org/api/people/14370/","name":"Marek Polacek","email":"polacek@redhat.com"},"content":"On Wed, Apr 15, 2026 at 12:27:53PM -0400, Patrick Palka wrote:\n> On Wed, 15 Apr 2026, Marek Polacek wrote:\n> \n> > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?\n> > \n> > -- >8 --\n> > For a generic lambda, we normally collect the captures while parsing\n> > the lambda: finish_id_expression calls process_outer_var_ref which does\n> > add_capture.  Then when instantiating, we'll find the capture via\n> > retrieve_local_specialization.  Once the closure type has been\n> > finalized, it's frozen and we can't add new fields.  This is what\n> > happens in the following test though, which is the reason we crash:\n> > \n> >   [&]<auto> {\n> >     [:e:];\n> >   }\n> > \n> > where while parsing we can't know what the splice will designate.\n> > We'll only find out after we've substituted the splice but then it's\n> > too late to capture anything.\n> > \n> > A possible solution would be to speculatively capture all locals when\n> > we see a dependent splice in a generic lambda.  But since this test is\n> > invalid anyway, that would be a lot of work for no good reason.  So this\n> > patch changes the internal_error to an ordinary error.\n> > \n> > \tPR c++/123783\n> > \n> > gcc/cp/ChangeLog:\n> > \n> > \t* lambda.cc (add_capture): When trying to capture something in\n> > \tan instantiation of generic lambda, give an error instead of an ICE.\n> > \n> > gcc/testsuite/ChangeLog:\n> > \n> > \t* g++.dg/reflect/dep14.C: New test.\n> > \t* g++.dg/reflect/dep15.C: New test.\n> > ---\n> >  gcc/cp/lambda.cc                     |  7 +++--\n> >  gcc/testsuite/g++.dg/reflect/dep14.C | 44 ++++++++++++++++++++++++++++\n> >  gcc/testsuite/g++.dg/reflect/dep15.C | 44 ++++++++++++++++++++++++++++\n> >  3 files changed, 93 insertions(+), 2 deletions(-)\n> >  create mode 100644 gcc/testsuite/g++.dg/reflect/dep14.C\n> >  create mode 100644 gcc/testsuite/g++.dg/reflect/dep15.C\n> > \n> > diff --git a/gcc/cp/lambda.cc b/gcc/cp/lambda.cc\n> > index e1ff304ffe8..bf9eda573e1 100644\n> > --- a/gcc/cp/lambda.cc\n> > +++ b/gcc/cp/lambda.cc\n> > @@ -729,8 +729,11 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p,\n> >        && current_class_type == LAMBDA_EXPR_CLOSURE (lambda))\n> >      {\n> >        if (COMPLETE_TYPE_P (current_class_type))\n> > -\tinternal_error (\"trying to capture %qD in instantiation of \"\n> > -\t\t\t\"generic lambda\", id);\n> > +\t{\n> > +\t  error (\"trying to capture %qD in instantiation of generic lambda\",\n> > +\t\t id);\n> > +\t  return error_mark_node;\n> > +\t}\n> >        finish_member_declaration (member);\n> >      }\n> >  \n> > diff --git a/gcc/testsuite/g++.dg/reflect/dep14.C b/gcc/testsuite/g++.dg/reflect/dep14.C\n> > new file mode 100644\n> > index 00000000000..e9464e529b2\n> > --- /dev/null\n> > +++ b/gcc/testsuite/g++.dg/reflect/dep14.C\n> > @@ -0,0 +1,44 @@\n> > +// PR c++/123783\n> > +// { dg-do compile { target c++26 } }\n> > +// { dg-additional-options \"-freflection\" }\n> > +\n> > +#include <meta>\n> > +\n> > +namespace __impl {\n> > +  template<auto... vals>\n> > +  struct replicator_type {\n> > +    template<typename F>\n> > +      constexpr void operator>>(F body) const {\n> > +        (body.template operator()<vals>(), ...);\n> > +      }\n> > +  };\n> > +\n> > +  template<auto... vals>\n> > +  replicator_type<vals...> replicator = {};\n> > +}\n> > +\n> > +template<typename R>\n> > +consteval auto expand(R range) {\n> > +  std::vector<std::meta::info> args;\n> > +  for (auto r : range) {\n> > +    args.push_back(reflect_constant(r));\n> > +  }\n> > +  return substitute(^^__impl::replicator, args);\n> > +}\n> > +\n> > +int func(int counter, float factor) {\n> > +    std::array<void *, parameters_of(^^func).size()> args;\n> > +\n> > +    std::size_t i = 0;\n> > +    [:expand(parameters_of(^^func)):] >> [&]<auto e>\n> > +    {\n> > +        args[i++] = &[:e:]; // { dg-error \"use of local variable|trying to capture \\[^\\n\\r]* in instantiation of generic lambda\" }\n> > +    };\n> > +    return 0;\n> > +}\n> > +\n> > +int main()\n> > +{\n> > +    func(11, 22);\n> > +    func(33, 44);\n> > +}\n> > diff --git a/gcc/testsuite/g++.dg/reflect/dep15.C b/gcc/testsuite/g++.dg/reflect/dep15.C\n> > new file mode 100644\n> > index 00000000000..060c9f680ab\n> > --- /dev/null\n> > +++ b/gcc/testsuite/g++.dg/reflect/dep15.C\n> > @@ -0,0 +1,44 @@\n> > +// PR c++/123783\n> > +// { dg-do compile { target c++26 } }\n> > +// { dg-additional-options \"-freflection\" }\n> > +\n> > +#include <meta>\n> > +\n> > +namespace __impl {\n> > +  template<auto... vals>\n> > +  struct replicator_type {\n> > +    template<typename F>\n> > +      constexpr void operator>>(F body) const {\n> > +        (body.template operator()<vals>(), ...);\n> > +      }\n> > +  };\n> > +\n> > +  template<auto... vals>\n> > +  replicator_type<vals...> replicator = {};\n> > +}\n> > +\n> > +template<typename R>\n> > +consteval auto expand(R range) {\n> > +  std::vector<std::meta::info> args;\n> > +  for (auto r : range) {\n> > +    args.push_back(reflect_constant(r));\n> > +  }\n> > +  return substitute(^^__impl::replicator, args);\n> > +}\n> > +\n> > +int func(int counter, float factor) {\n> > +    std::array<void *, parameters_of(^^func).size()> args;\n> > +\n> > +    std::size_t i = 0;\n> > +    [:expand(parameters_of(^^func)):] >> [&i, &counter, &factor, &args]<auto e>\n> > +    {\n> > +        args[i++] = &[:e:]; // { dg-error \"use of local variable\" }\n> > +    };\n> \n> Could we combine these two nearly identical rejects-valid tests?  It'd\n> shave a second or two of overall testsuite compile times since <meta> is\n> a rather big header.\n\nYes, done in the patch I'm about to post.\n\nMarek","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=Nxz5AW+k;\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 (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Nxz5AW+k","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 [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 4fwnJC3Ccqz1yHc\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 02:52:42 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 1B0124BA2E11\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 16:52:40 +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 DA8DA4BA2E0A\n for <gcc-patches@gcc.gnu.org>; Wed, 15 Apr 2026 16:52:11 +0000 (GMT)","from mail-qv1-f71.google.com (mail-qv1-f71.google.com\n [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-677-DqoBLibvOEaIsRbozW0nrQ-1; Wed, 15 Apr 2026 12:52:10 -0400","by mail-qv1-f71.google.com with SMTP id\n 6a1803df08f44-8acd145817dso17919636d6.3\n for <gcc-patches@gcc.gnu.org>; Wed, 15 Apr 2026 09:52:10 -0700 (PDT)","from redhat.com ([2603:7000:9500:10::1db4])\n by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8ae6c93830esm19955086d6.9.2026.04.15.09.52.07\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Apr 2026 09:52:07 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 1B0124BA2E11","OpenDKIM Filter v2.11.0 sourceware.org DA8DA4BA2E0A"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org DA8DA4BA2E0A","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org DA8DA4BA2E0A","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776271932; cv=none;\n b=L94TJxmKGxfQoQuKercnPcpzrGzQftnFCPGec2wWJ/qBL5arKRFaxIFR7AkMG0T8eyfCdxFChpF+Ti+4CZ98ul+se+Q3TOTTWuZ7pOVAugsxdCMp86fEdJOB3WrJytRH9djZVJvQwv2+dlMOp+XgzTXE/6DKF7SBM8xVROt7Wh0=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776271932; c=relaxed/simple;\n bh=5VQcbPT2lksYe9TuqiUHisa1lDlo65wVlNVwzVSct1Q=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=M5wjg7H4InoUZoDvk1MEG9dZmj5+Ark5jGeyhaBB38dR85NyL20zmj6cnG0L/HqikQZTcK3dr4aoT1/kODfPhjUFKQhFcIX0PEPy71+oFbosv+Ze05TM02Qn3o2r9RnAlH0Xu0pJHxHAbE1lnCmQDS/JqP0QYJRPkwmLMl3gLRM=","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=1776271931;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=3Njwj5KCKkjqZfwDHGsRpAh7tLVAQT6XZKizrFyFTv4=;\n b=Nxz5AW+kXUqH6pDvC033Bx2CsIHvEZyjQElgVzj8cjsIcXrtVXtPRkwBgbs9BL8LVVb3Lp\n uhBsx0AMVtboyUx0TTN4HvVSYDN7xCiYm78g8BICJ+R/jY+Rg7PUTIl2biOREbUUIs5tho\n P/f0SfV9UGgmHQgBOmE4ofnUrX8hI/4=","X-MC-Unique":"DqoBLibvOEaIsRbozW0nrQ-1","X-Mimecast-MFC-AGG-ID":"DqoBLibvOEaIsRbozW0nrQ_1776271930","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776271929; x=1776876729;\n h=user-agent:in-reply-to:content-disposition:mime-version:references\n :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=3Njwj5KCKkjqZfwDHGsRpAh7tLVAQT6XZKizrFyFTv4=;\n b=JNeWDO0+rsERLa+s/a9MuJ77W2qssjzdTpxLViU/APLfHSLNVwubaAERYA4WN8XVFK\n IQbqxfNncTPu+BvLypXelSxaJVbSIJZ9kAidKNiIaQ3gyyJAN5Bp03eBirbpv5Ihd2y6\n O4DnlAdIsqhP1/XFYOHZK7HgrdadXM4wc9/ejaU4CE3ZmHdoRF2Z1SzAterGmN1tdwQH\n +oKsEWSAFyLc/8BqnCWjsDOVCBKVBY62xM3fR4W8OeKosStzxZ9D63EXeteJLgZITBJp\n 0PC+felBVorsLWJfe4wL2TytXgB4IEYiLpntMDOPcpz3I45awme6lT1dFXGhzg4Rdn9F\n B3XQ==","X-Gm-Message-State":"AOJu0YyTKtus/MbxGv6MfLpdLg258ESInuVAjSS+XDB0Qy2Ac1Q32Xat\n mWPizEpjfprLonReKagBtNOv6stGhMT9mjycaM7EidlWo2s1U0ub0RBVwxrR3qm2hcshwHTPnyW\n GgXIv7Ao21WHXaVzeRZSNfeSaZyzlwRKVYfVANBvI/1amsM9UaHbCXlRLw7a9Zp7gyYo=","X-Gm-Gg":"AeBDiesDIZbpGLos4N6M2qk4YTDzEQ2AWZ/HM+03+BFac/Cq3+WcqkJhlME33stYWbH\n OIqTK36ROW3PR9RjnLSGZsmT+hQFkDTFpq5bUZt4S+Qn7bsecYxPl/Jqhx2qN+WFQ1Vs5tHu/Pq\n qUQ/yEeSkodwluGBpt5iGWy9Bx4Gt3G2gQVxVMZKc2zIhJAeO+xAWPXENbr3+6NFYiOIvZek7G9\n mfp4Wh0+hpEih92j5JUjbghzsCDAfpCPKEs4baGMLQOs4yNOp7qZZHbdEZiy3I0vP+juUleksft\n Yff5RmYDn/GxdYEwJerMHHIxa0r2R/nu9anC8dNROKUDAPjD8zr1Wk1Ra0WVyFoxi1GI5FfuC/F\n 4/Q==","X-Received":["by 2002:a05:6214:5b0d:b0:8ac:ae21:466 with SMTP id\n 6a1803df08f44-8acae210fe4mr215838216d6.24.1776271929177;\n Wed, 15 Apr 2026 09:52:09 -0700 (PDT)","by 2002:a05:6214:5b0d:b0:8ac:ae21:466 with SMTP id\n 6a1803df08f44-8acae210fe4mr215837506d6.24.1776271928646;\n Wed, 15 Apr 2026 09:52:08 -0700 (PDT)"],"Date":"Wed, 15 Apr 2026 12:52:06 -0400","From":"Marek Polacek <polacek@redhat.com>","To":"Patrick Palka <ppalka@redhat.com>","Cc":"GCC Patches <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>","Subject":"Re: [PATCH] c++/reflection: generic lambda with dependent splice\n [PR123783]","Message-ID":"<ad_CNtJdspG2OdBV@redhat.com>","References":"<20260415161149.691849-1-polacek@redhat.com>\n <cffff383-feb8-fa88-8f72-e39981035616@idea>","MIME-Version":"1.0","In-Reply-To":"<cffff383-feb8-fa88-8f72-e39981035616@idea>","User-Agent":"Mutt/2.3.1 (2026-03-20)","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"EBRblwLgNAzxCE8kMqw0UA42X0YhmsAuioE-3YyQWUQ_1776271930","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","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"}}]