Template type deduction and specialization

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 20 03:20:19 PDT 2015


On 5/20/2015 6:35 PM, Jonathan M Davis via Digitalmars-d-learn wrote:

> I'm using a fairly recent version of dmd master, and it prints out the
> address for px in both cases when I compile your code. So, if it's printing
> out 100 for you on the second call, it would appear to be a bug that has
> been fixed at some point since 2.067 (or whatever version you're using) was
> released.
>
> - Jonathan M Davis
>
I'm using 2.067.0, but according to the section of the docs Daniel 
pointer me to[1], printing 100 is the correct behavior in the second call.

[1] http://dlang.org/template.html#function-templates


More information about the Digitalmars-d-learn mailing list