mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-29 09:18:52 +00:00
15 lines
231 B
C++
15 lines
231 B
C++
|
// Test for multidimensional subscript operator support.
|
||
|
// Proposed for C++23: P2128R6.
|
||
|
struct table
|
||
|
{
|
||
|
int width = 100;
|
||
|
|
||
|
int operator[](int x, int y) const { return x + width * y; }
|
||
|
};
|
||
|
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
return table{}[0, 0];
|
||
|
}
|