I haven't been following the $/__dollar/opDollar/etc chronicles very closely, and I can't find the answer in the docs, but I have simple question:
Suppose I have this: ------------------------------- class Foo { int[] data; this(int[] data) { this.data = data; } ref T opIndex(size_t i) { return data[i]; } } void main() { auto foo = Foo([1,2,3,4,5]); ... } ------------------------------- Question: Is there currently any way for Foo's author to make "foo[$-1]" work? If so, how?