(j3.2006) Did we intend to prohibit this?

Van Snyder Van.Snyder
Fri Mar 10 13:55:22 EST 2017

On Fri, 2017-03-10 at 10:32 +0900, Cohen Malcolm wrote:

> > If I do

> >   V = F(X)

> > will most processors do the same as move_alloc, or will they
> > allocate a new v, copy the contents of the result of F(X) to it,
> > and deallocate the result of F(X)?

> Whether processors do or do not do some clever optimisations is not
> the purview of the standard.

The question clearly was not about the standard.

> Perhaps it would be better to be using an allocatable dummy argument
> if you want to do your own optimisations.

If I had the code instead of only an interface block, I might have been
tempted.  A wrapper leaves me right back where I started.

More information about the J3 mailing list