Parameter.isCovariant

Compute covariance of parameters this and p as determined by the storage classes of both.

class Parameter
const pure nothrow @nogc @safe
bool
isCovariant
(,
const Parameter p
,
bool previewIn = global.params.previewIn
)

Parameters

returnByRef bool

true if the function returns by ref

p Parameter

Parameter to compare with

previewIn bool

Whether -preview=in is being used, and thus if in means scope [ref].

Return Value

Type: bool

true = this can be used in place of p false = nope

Meta