Compile-time optimization

Yota yotaxp at thatGoogleMailThing.com
Tue Jul 23 15:41:05 PDT 2013


On Tuesday, 23 July 2013 at 22:38:35 UTC, Yota wrote:
>   typeof(Xs[0]) sum(Xs...)()
>   {
>       pragma(msg, Xs); // tuple(1, 2, 3)
>       typeof(Xs[0]) y;
>       foreach(x; Xs) y ~= x;
>       return y;
>   }

*facepalm*
That ~= in there is what I get for copying code after I 
experiment on it.  Ment for it to be a +=. Phooey

~Yota


More information about the Digitalmars-d mailing list