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 #264

Closed
jonathanpoelen opened this issue Oct 23, 2019 · 2 comments
Closed

Folding expressions missing parenthesis #264

jonathanpoelen opened this issue Oct 23, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@jonathanpoelen
Copy link

Similar to #91, but for other operators.

auto f = [](auto... i) { return (.../i); }; // (__i0 / __i1 / __i2)
auto g = [](auto... i) { return (i/...); }; // (__i0 / __i1 / __i2) also
f(1,2,3);
g(1,2,3);

https://cppinsights.io/lnk?code=aW50IG1haW4oKQp7CiAgYXV0byBmID0gW10oYXV0by4uLiBpKSB7IHJldHVybiAoLi4uL2kpOyB9OwogIGF1dG8gZyA9IFtdKGF1dG8uLi4gaSkgeyByZXR1cm4gKGkvLi4uKTsgfTsKICBmKDEsMiwzKTsKICBnKDEsMiwzKTsKfQ==&insightsOptions=cpp2a&std=cpp2a&rev=1.0

@andreasfertig andreasfertig added the bug Something isn't working label Oct 25, 2019
@andreasfertig
Copy link
Owner

Hello @jonathanpoelen,

thank you for discovering and reporting this. I probably was to conservative with the fix in #91.
I will push a fix probably by today.

Andreas

@andreasfertig
Copy link
Owner

Looks like there are multiple issues with the CI builds. With that, I will not be able to provide a fix today.

Andreas

andreasfertig added a commit that referenced this issue Oct 27, 2019
Fixed #264: Wrap BinaryOperators in their according parentheses.
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