Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folding expressions missing parenthesis #91

Closed
nitnelave opened this issue Nov 12, 2018 · 2 comments
Closed

Folding expressions missing parenthesis #91

nitnelave opened this issue Nov 12, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@andreasfertig
Copy link
Owner

Hello nitnelave,

thanks for reporting this, quite interesting. I briefly looked into it and in the AST at this point there are no parentheses. I need to look deeper into it to figure out what I can do.

@andreasfertig
Copy link
Owner

Hello @nitnelave,

it looks like I finally understood it. I believe that this is a special case with fold expression. Their pattern is specified in the standard [temp.variadic] p10.1 - p10.2. Hence it does not require parentheses. A patch is on its way to add them in case of + or -.

andreasfertig added a commit that referenced this issue Mar 14, 2019
Fixed #91: Add parentheses for BinaryOperator with `+` or `-`.
@andreasfertig andreasfertig added the bug Something isn't working label Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants