[C++2b] Implement multidimentional subscript operator
Implement P2128R6 in C++23 mode. Unlike GCC's implementation, this doesn't try to recover when a user meant to use a comma expression. Because the syntax changes meaning in C++23, the patch is *NOT* implemented as an extension. Instead, declaring an array with not exactly 1 parameter is an error in older languages modes. There is an off-by-default extension warning in C++23 mode. Unlike the standard, we supports default arguments; Ie, we assume, based on conversations in WG21, that the proposed resolution to CWG2507 will be accepted. We allow arrays OpenMP sections and C++23 multidimensional array to coexist: [a , b] multi dimensional array [a : b] open mp section [a, b: c] // error The rest of the patch is relatively straight forward: we take care to support an arbitrary number of arguments everywhere.
Loading
Please register or sign in to comment