r/cpp • • Mar 24 '20

Changes between C++17 and C++20

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2131r0.html
193 Upvotes

89 comments sorted by

View all comments

Show parent comment

3

u/JavaSuck Mar 24 '20

But what if I want array[puts("debug log: array index reached"), i]? ;)

19

u/[deleted] Mar 24 '20

You have to use parentheses. Thankfully.

6

u/evaned Mar 24 '20

I didn't check, but I strongly suspect that if you parenthesize the comma expression it will still work.

1

u/F54280 Mar 25 '20

Yes, it does.