Daily bit(e) of C++ | multi-dimensional operator[]
Daily bit(e) of C++ ♻️4, The C++23 multi-dimensional subscript operator[].
The C++23 introduced a major change for the subscript operator, allowing it to take multiple arguments.
When multiple arguments are provided, they are separated by a comma. The standard comma operator in subscripts was deprecated in C++20.
This finally gives C++ a way to interface with multi-dimensional data structures naturally.
Because overloaded operators can have arbitrary arguments, the multi-argument operator[] can also serve as an alternative to the operator().