struct Test{<br><br> public double[3] ar_;<br> this(double[3] ar){<br> this.ar_ = ar;<br> }<br>}<br><br>void main(){<br><br> double[3] v1 = [1.0, 2.0, 3.0];<br> double[3] v2 = [2.0, 3.0, 4.0];<br><br> auto t1 = Test(v1[0..$] + v2[0..$]); // error<br>
<br>}<br><br><br>I want to add those two arrays and call the constructor in one line, but I'm getting an error. Any ideas?<br>