Repository navigation
Out-of-line member function definition with a constrained placeholder return type is rejected #353
gwllx
started this conversation in
Issue Triage - Compilation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
An out-of-line member function definition of a template class with a constrained placeholder return type that includes template arguments is rejected with the error: "template argument list must match the parameter list".
Reproducing Source Code
https://godbolt.org/z/YnTEzvY77
Note: If the type-constraint
Chas only 1 template arg such that the spelling isC auto, or ifSitself is not a template class, this is accepted.Command-line Options
cpfe --c++20
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
Suggested patch: concept_template_in_return_type.patch
This patch recognises the template args following the concept-id within
decl_specifierand bypasses them to ensure the declarator prescan starts following them.Reproducing (Standard) Configuration(s)
linux-gcc-debug
Reproducing (Non-standard) Configuration
No response
I acknowledge that:
LICENSE.txtfile in my.zipor.tar.gzupload. If I included aLICENSE.txtfile, any tests created using the reproducing source code will be governed by the terms of the license I provided instead.All reactions