[PR c+ 94827]: template parm with default requires

Nathan Sidwell nathan@acm.org
Thu Apr 30 15:29:42 GMT 2020


On 4/30/20 10:35 AM, Nathan Sidwell wrote:
> On 4/30/20 10:18 AM, Jason Merrill wrote:
>> On 4/29/20 2:50 PM, Nathan Sidwell wrote:
>>> Jason,
>>> this is the patch you suggested, as I understood it.  I kept 
>>> finish_nested_require's saving of the (converted) 
>>> current_template_parms, becase of the comment about use in diagnostics.
>>>
>>> Is this what you meant?
>>
>> Yes, this looks fine.
>>
>> But I don't think that we need to keep saving the converted 
>> current_template_parms; diagnostics could also normalize using 
>> NULL_TREE args.  And it looks like diagnose_nested_requirement isn't 
>> currently doing re-normalization anyway.  This doesn't need to block 
>> the release, though.
> 
> Ok, I'll deal with that post-release.
> 
> Here's a modified version.  The only change is to remove an assert in 
> tsubst_nested_requirement.  We have an arg_vec of 2, but only the first 
> is filled in.  Thus we think the NULL one is a dependent type.
> 
> The testcase checks we evaluate the default arg as expected.
> 
> I don't expect the bootstrap to fail, because this is removing an assert.

indeed it didn't.  The patch is pushed to trunk

nathan


-- 
Nathan Sidwell


More information about the Gcc-patches mailing list