The [] operator must be a non-static member function.
I have been able to write a class and overload the [] operator. But in my weird case, I would like to have an array of elements:
MyClass elements[6];
But I don't actually want element access
element[2]
to use regular pointer arithmetic; rather I'd like it to call my own [] operator.
Is there any way to do that?