how is this array subtyping inside struct (bug?) possible?

mw mingwu at gmail.com
Mon Aug 10 21:44:39 UTC 2020


On Monday, 10 August 2020 at 19:52:19 UTC, Steven Schveighoffer 
wrote:

> What might work (and I haven't tried this) is to @disable 
> front, popFront, empty, and I think what will then happen is 
> the compiler will try slicing instead (which should work) and 
> iterate a copy of the array.

compiler => library  :-)

BTW, where is the code of this interface testing sequence?

I think we should change the testing order to try slicing first, 
because slice is a “view” (readonly to the underlying data) 
struct.



More information about the Digitalmars-d mailing list