opIndexMember

Dennis dkorpel at gmail.com
Sun Dec 27 15:02:16 UTC 2020


On Sunday, 27 December 2020 at 14:46:43 UTC, claptrap wrote:
> So you can do stuff like this....

What's wrong with this?
```
struct VecArray
{
      float[] _x;
      float[] _y;
      float[] _z;

     Vector opIndex(size_t idx) {
         return Vector(_x[idx], _y[idx], _z[idx]);
     }
}
```

Performance in debug builds?


More information about the Digitalmars-d mailing list