View source code
Display the source code in dmd/escape.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

dmd.escape.ReturnParamDest/returnParamDest - multiple declarations

Function returnParamDest

Find out if instead of returning a return parameter via a return statement, it is returned via assignment to either this or the first parameter.

ReturnParamDest returnParamDest (
  TypeFunction tf,
  Type tthis
);

This works the same as returning the value via a return statement. Although the first argument must be ref, it is not regarded as returning by ref.

See Also

https://dlang.org.spec/function.html#return-ref-parameters

Parameters

NameDescription
tf function type
tthis type of this parameter, or null if none

Returns

What a return parameter should transfer the lifetime of the argument to

Enum ReturnParamDest

How a return parameter escapes its pointer value

enum ReturnParamDest : int { ... }

Enum members

NameDescription
firstArg assigned to first argument: firstArg = x
returnVal through return statement: return x
this_ assigned to a struct instance: this.x = x

Authors

Walter Bright

License

Boost License 1.0