Querying parameter passing semantics for `auto ref const` variables
Nordlöw via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 15 06:33:25 PST 2017
Is there a way to query at compile-time whether a call to
f(T)(auto ref const T x)
passed the variable `x` from a l-value or r-value?
A call to `isRef!T` inside the function `f` is always `false` for
`l-value` and `r-value` passing.
I need this to detect automatic delayed evaluation of
sub-expressions in my GNU MP wrapper at
https://github.com/nordlow/gmp-d
More information about the Digitalmars-d-learn
mailing list