Closed
Description
Describe the bug
Cppfront reports an error when parsing the following expression, presumably because of the ambiguity of >=
.
vec: std::vector<int>=(1,2,3);
To Reproduce
Run cppfront on this code:
main: () -> int = {
v1: std::vector<int> = (1,2,3); // OK
v2: std::vector<int> =(1,2,3); // OK
v3: std::vector<int>=(1,2,3); // Error
v4: std::vector<int>= (1,2,3); // Error
return 0;
}
The error is:
error: missing ';' at end of declaration or '=' at start of initializer (at '<')
error: ill-formed initializer (at '{')
error: unexpected text at end of Cpp2 code section (at 'main')
error: parse failed for section starting here
Repro on Godbolt