https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117513
Bug ID: 117513
Summary: Lambda with expression containing > passed as a
template parameter is parsed incorrectly.
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: elliot.haisley at gmail dot com
Target Milestone: ---
Created attachment 59570
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59570&action=edit
Reproducer
The attached code is incorrectly diagnosed. Clang and CL parse and accept the
code.
<source>: In lambda function:
<source>:5:34: error: expected ';' before '>' token
5 | A<[](int a, int b) { return a>b; }> a;
| ^
| ;