template ref parameter
Jonathan M Davis
jmdavisProg at gmx.com
Wed Nov 21 04:17:09 PST 2012
On Wednesday, November 21, 2012 13:09:05 Jack Applegame wrote:
> On Wednesday, 21 November 2012 at 12:05:23 UTC, bearophile wrote:
> > In one case the function expects a pointer and in one case it
> > expects a int value. The assembly code of the two functions is
> > different and does different things.
>
> Of course. And it is mean that ref indeed is a part of type.
storage classes on function parameters affect the type of the function, but
they do not affect the type of the parameter. If a function has a parameter
named foo, then typeof(foo) is going to be the same whether ref is on it or
not.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list