void init of out variables

kinke via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 19 04:01:49 PDT 2017


On Saturday, 19 August 2017 at 06:20:28 UTC, Nicholas Wilson 
wrote:
> is there a way to not assign to out variables?

I don't think so. Is there a good reason not to return the matrix 
directly (taking advantage of in-place construction)?

float[M][M] f()
{
     float[M][M] mean = void;
     // init
     return mean;
}



More information about the Digitalmars-d mailing list