Why dynamic array is InputRange but static array not.

lili akozhao at tencent.com
Tue Sep 24 07:35:24 UTC 2019


Hi:
   in phobos/std/range/primitives.d has this code
  ```
    static assert( isInputRange!(int[]));
    static assert( isInputRange!(char[]));
    static assert(!isInputRange!(char[4]));
    static assert( isInputRange!(inout(int)[]));
     ```
  but the dynamic array and static array neither not has 
popFront/front/empty.
https://dlang.org/spec/arrays.html#array-properties properties


More information about the Digitalmars-d-learn mailing list