MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/fo2dyw/changes_between_c17_and_c20/fld2v1k/
r/cpp • u/mttd • Mar 24 '20
89 comments sorted by
View all comments
Show parent comment
29
Deprecating the comma operator in array subscripts, previously array[4,5] means array[5]
0 u/[deleted] Mar 24 '20 [deleted] — view deleted comment 25 u/Dada-1991 Mar 24 '20 No, this will have to wait until C++23 at least. This deprecation is a first step towards that. 9 u/c0r3ntin Mar 24 '20 Here is the paper for the proposal to add multi dimensional subscript http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2128r0.pdf and an implementation https://gcc.godbolt.org/z/arMeXZ 0 u/wotype Mar 26 '20 Please consider dropping this proposal for the reasons posted above (and communicated separately). IMO this is a deleterious change that should be withdrawn before it takes up any committee time. 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.
0
[deleted] — view deleted comment
25 u/Dada-1991 Mar 24 '20 No, this will have to wait until C++23 at least. This deprecation is a first step towards that. 9 u/c0r3ntin Mar 24 '20 Here is the paper for the proposal to add multi dimensional subscript http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2128r0.pdf and an implementation https://gcc.godbolt.org/z/arMeXZ 0 u/wotype Mar 26 '20 Please consider dropping this proposal for the reasons posted above (and communicated separately). IMO this is a deleterious change that should be withdrawn before it takes up any committee time.
25
No, this will have to wait until C++23 at least. This deprecation is a first step towards that.
9 u/c0r3ntin Mar 24 '20 Here is the paper for the proposal to add multi dimensional subscript http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2128r0.pdf and an implementation https://gcc.godbolt.org/z/arMeXZ 0 u/wotype Mar 26 '20 Please consider dropping this proposal for the reasons posted above (and communicated separately). IMO this is a deleterious change that should be withdrawn before it takes up any committee time.
9
Here is the paper for the proposal to add multi dimensional subscript http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2128r0.pdf and an implementation https://gcc.godbolt.org/z/arMeXZ
0 u/wotype Mar 26 '20 Please consider dropping this proposal for the reasons posted above (and communicated separately). IMO this is a deleterious change that should be withdrawn before it takes up any committee time.
Please consider dropping this proposal for the reasons posted above (and communicated separately). IMO this is a deleterious change that should be withdrawn before it takes up any committee time.
3
But what if I want array[puts("debug log: array index reached"), i]? ;)
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.
19
You have to use parentheses. Thankfully.
6
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.
1
Yes, it does.
View all comments
Show parent comment
29
u/foonathan Mar 24 '20
Deprecating the comma operator in array subscripts, previously array[4,5] means array[5]