I made "T operator[](int i) const" and "T& operator[](int i)" for class A.
(and I also tried it for "const T& operator[](int i) const" and "T& operator[](int i)")
The operator print a value to distinguish which operator is called.
A a;
int k = a[0];
k = a[0];
const int l = a[0];
result : three calls of non-const version.
How can I call const version? Should I use const class? There is no chance to call a function that is const version without using const class?