On 3/29/23 11:01 PM, Salih Dincer wrote:

```d
import std.algorithm.mutation : copy;
void main()
{
   int[8] buf;
   auto dig = [1, 2, 3, 4];
   auto rem = dig.copy(buf);
   assert(rem.length == 4);
}

```

Looks like 'copy' has the same overload issue.

A static array is not a range of any kind. What would `popFront` do on a static array, since the length is part of the type?

But you can do `dig.copy(buf[])` since a dynamic array is.

-Steve
  • Re: The Phobos Put Dennis via Digitalmars-d-learn
    • Re: The Phobos Put Ali Çehreli via Digitalmars-d-learn
      • Re: The Phobos Put Salih Dincer via Digitalmars-d-learn
        • Re: The Phobos P... Ali Çehreli via Digitalmars-d-learn
          • Re: The Phob... ag0aep6g via Digitalmars-d-learn
            • Re: The... Ali Çehreli via Digitalmars-d-learn
              • Re:... ag0aep6g via Digitalmars-d-learn
              • Re:... Salih Dincer via Digitalmars-d-learn
              • Re:... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... Salih Dincer via Digitalmars-d-learn
              • Re:... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... Salih Dincer via Digitalmars-d-learn
              • Re:... Paul Backus via Digitalmars-d-learn
              • Re:... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... Paul Backus via Digitalmars-d-learn
              • Re:... Salih Dincer via Digitalmars-d-learn

Reply via email to