From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 158823858C33 for ; Fri, 2 Feb 2024 20:01:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 158823858C33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 158823858C33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706904122; cv=none; b=X8x2cclRM8cCE35MiytqyGBAlFhxW580K9iT/Fjx9MoqthElyCFK90lS3mxazg2Dw8Fb4qiDYbMhE/cN8e56taXnpm9YzpvDfm5gXbl7X33eboyzKGTOT87ZusgroRHZd4vmOYFQYCNn0aoyrlUl/BXe8Q9/q8WBYwhOUMcyWqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706904122; c=relaxed/simple; bh=p0o4h7drDYxB142aNHlkj5OrBE1WgiUYVsXoRDSETGY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=hHn5AZurXNU5yvipvT3p4qOR25BZdRGlLRH97WaZIH8t9RN5XdzuCp600hgnqsh4cVYQAoYsFu+4w6Zm8sojS3aZWMLDXyfNJgSaEKM1chU0F8SYYIxxkELHtqnOtZQgG8KEgWCUxqdYsVhqvL6M4Yot3G/4EHfuEYbVWCx+Axg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706904118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dP4If8AZEbAfCMw+LjQ1oCRIAEVHvADesZ8/1GDeDl0=; b=QXqZrpBKF9xmSRKsmAmCLiVHmYeZwAEIpeLieyBlU6GEVFzur/B88Sb1stN/e5+fUdXSMj 4C0YXLxoJra3A5KoySARLyaxXV1/af40pmGDjYOnzc937PvULJtr1a4gjGu19pSdogcXQd JruVSSOUr637wJfWdg7rxXmEk3DmSIQ= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-227-jbvBGgEYN-u9JhSmnjXCaA-1; Fri, 02 Feb 2024 15:01:57 -0500 X-MC-Unique: jbvBGgEYN-u9JhSmnjXCaA-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-783f387ed7eso305260285a.1 for ; Fri, 02 Feb 2024 12:01:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706904117; x=1707508917; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dP4If8AZEbAfCMw+LjQ1oCRIAEVHvADesZ8/1GDeDl0=; b=Xe1Md1gdezB37HUxZxLNZ7LrCGlGr4sGt+kcsQz9+mY9VWM5Y1RL4cNSfLPhyc83b1 eUocvfXunZwTbyKcgnYwQiwTNIAcc9+yCAMR9y7H7S1Fo0tmL7Q9r89wKNMM/4aUViTk 73IDZ225tgBuPqGLPp05IeYx9HjsLVujkcc+Gm1ILhIbH9amwC+0l+BzlPSPRpZkrv/k nD71nQNOiQxlA39ggOu1dCsku3jP6VkyQbwsQrRfW/HX82dmSFVvaucW9Fvsej3WLyep 2aGLi6ETZGsmbTcOVpShig9NiXhhixAuLrOtSe0AZcxzb09woZz8C/dMdkIob9JQqbmJ 7YuA== X-Gm-Message-State: AOJu0Yz1PXSpSXGV8GJbS7E59lAiv3rclnefbrFo96tTPV/DC3+v5y5L 9pQ0ildpmwmtUazIeFz2QREhh1QrQxt2roZPkCu0Y/NUreaUckWZ8XB86rCrrviv9XQ0vhGA9aK r1amxslTOc+yvyc1npn1+u2dg9Dtu5vo8el8MweVnN4bZIXdLivgVglU= X-Received: by 2002:a05:620a:31a7:b0:785:40f4:8886 with SMTP id bi39-20020a05620a31a700b0078540f48886mr8503023qkb.6.1706904116783; Fri, 02 Feb 2024 12:01:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNEbnCGEcZ/trGOPkttj7TvAJYY1Asu/QWSuSrmSZNC8c88PTK3J8wcJGpepGTwpZk7PkOBA== X-Received: by 2002:a05:620a:31a7:b0:785:40f4:8886 with SMTP id bi39-20020a05620a31a700b0078540f48886mr8502991qkb.6.1706904116325; Fri, 02 Feb 2024 12:01:56 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU5KbUGGgHJSNjaEYa9eufAJ9I6cfPyHTbFLrO5VKNjASnnzSgfed6a27gIkJvtMnbtkcFJO5flv34leimDqkvYLgoqkIEqEg== Received: from [192.168.1.146] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id r1-20020a05620a298100b00783148d1269sm929604qkp.62.2024.02.02.12.01.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Feb 2024 12:01:55 -0800 (PST) Message-ID: Date: Fri, 2 Feb 2024 15:01:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769] To: Patrick Palka , gcc-patches@gcc.gnu.org References: <20240202194104.317982-1-ppalka@redhat.com> From: Jason Merrill In-Reply-To: <20240202194104.317982-1-ppalka@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2/2/24 14:41, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this > look OK for trunk? > > -- >8 -- > > In r11-3261-gb28b621ac67bee we made tsubst_requires_expr never partially > substitute into a requires-expression so as to avoid checking its > requirements out of order during e.g. generic lambda regeneration. > > Unfortunately we still do need to partially substitute into a > requires-expression in rare cases, in particular when it's used in > associated constraints that we are directly substituting for sake of > declaration matching or dguide constraint rewriting. We can identify > this situation by checking processing_constraint_expression_p, so this > patch uses this predicate to control whether we defer substitution or > partially substitute. The entering_scope=true change in tsubst_baselink > is needed to avoid ICEing from tsubst_baselink during name lookup when > rewriting std::ranges::ref_view's dguide constraints. Actually, I don't think we want to enter the scope when rewriting constraints. Would tsubst_scope work instead? Jason