On Friday, 6 September 2019 at 09:14:31 UTC, Andrew Edwards wrote:
C++ allows the for following:struct Demo { float a, b, c, d; Demo() { a = b = c = d = 0.0f; } Demo(float _a, float _b, float _c, float _d) { a = _a; b = _b; c = _c; d = _d; } float operator[] (size_t i) const { return (&a)[i]; } //[3] float& operator[] (size_t i) { return (&a)[i]; } //[4] }
https://dlang.org/spec/simd.html also probably u can do https://run.dlang.io/is/WMQE93