Re: static opSlice is not possible

2018-02-16 Thread Alex via Digitalmars-d-learn
On Friday, 16 February 2018 at 13:35:03 UTC, Basile B. wrote: Technically iy's a multi dimensional slicing but there's a constraint on the number of dimension allowed so that it looks exactly like a normal opSlice. By the way, i reduced too much. This shows more how it works: struct Foo {

Re: static opSlice is not possible

2018-02-16 Thread Basile B. via Digitalmars-d-learn
On Friday, 16 February 2018 at 13:23:09 UTC, Basile B. wrote: On Thursday, 15 February 2018 at 22:49:56 UTC, Alex wrote: Hi all, a short question about an old bug: https://issues.dlang.org/show_bug.cgi?id=11877 Are there reasons, which speaks against this feature? And maybe another one, more

Re: static opSlice is not possible

2018-02-16 Thread Basile B. via Digitalmars-d-learn
On Thursday, 15 February 2018 at 22:49:56 UTC, Alex wrote: Hi all, a short question about an old bug: https://issues.dlang.org/show_bug.cgi?id=11877 Are there reasons, which speaks against this feature? And maybe another one, more general: Is there any place, where it is documented, which

Re: static opSlice is not possible

2018-02-15 Thread Alex via Digitalmars-d-learn
On Thursday, 15 February 2018 at 23:31:23 UTC, Jonathan M Davis wrote: On Thursday, February 15, 2018 23:22:17 Adam D. Ruppe via Digitalmars-d- learn wrote: On Thursday, 15 February 2018 at 23:20:42 UTC, Jonathan M Davis wrote: > The only overloaded operator that I'd expect to work as >

Re: static opSlice is not possible

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 23:22:17 Adam D. Ruppe via Digitalmars-d- learn wrote: > On Thursday, 15 February 2018 at 23:20:42 UTC, Jonathan M Davis > > wrote: > > The only overloaded operator that I'd expect to work as static > > would be opCall, which I expect works primarily because of > >

Re: static opSlice is not possible

2018-02-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 15 February 2018 at 23:20:42 UTC, Jonathan M Davis wrote: The only overloaded operator that I'd expect to work as static would be opCall, which I expect works primarily because of functors but is useful for factory functions as well. static opCall is kinda weird in practice and

Re: static opSlice is not possible

2018-02-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 15, 2018 22:49:56 Alex via Digitalmars-d-learn wrote: > Hi all, > a short question about an old bug: > https://issues.dlang.org/show_bug.cgi?id=11877 > > Are there reasons, which speaks against this feature? > > And maybe another one, more general: > Is there any place, where

static opSlice is not possible

2018-02-15 Thread Alex via Digitalmars-d-learn
Hi all, a short question about an old bug: https://issues.dlang.org/show_bug.cgi?id=11877 Are there reasons, which speaks against this feature? And maybe another one, more general: Is there any place, where it is documented, which operators can work in static mode and which cannot?