.tupleof for static array

Dennis dkorpel at gmail.com
Tue Aug 10 12:01:24 UTC 2021


```D
struct Vec {
     float x, y, z;
}

void setPosition(float x, float y, float z) {

}

void main() {
     Vec posS = Vec(10, 20, 30);
     setPosition(posS.tupleof); // pass

     float[3] posA = [10, 20, 30];
     setPosition(posA.tupleof); // Error: no property `tupleof` 
for type `float[3]`
}
```

Does anyone know a library utility to make expanding a static 
array like this work?


More information about the Digitalmars-d-learn mailing list