class V(T) { public: this() {} V opIndex(size_t i, size_t j) { writeln("Hello, foo!"); return this; } }
main() { auto v = new V!int(); auto u = v[3..4]; // ERROR } Error: no [] operator overload for type the_module.V!int
Enjoys Math via Digitalmars-d-learn Sun, 24 Jan 2016 22:40:47 -0800
class V(T) { public: this() {} V opIndex(size_t i, size_t j) { writeln("Hello, foo!"); return this; } }
main() { auto v = new V!int(); auto u = v[3..4]; // ERROR } Error: no [] operator overload for type the_module.V!int