Pass type directly to a template function?
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Feb 7 17:44:23 PST 2017
On Tuesday, 7 February 2017 at 21:40:04 UTC, Dukc wrote:
> On Tuesday, 7 February 2017 at 10:21:20 UTC, Mike Parker wrote:
>>> function2!float(); //?
>>> function3!float(); //?
>>
>> Yes, this is how it's done.
>
> Not quite with function3, because it takes one unnamed runtime
> parameter. It can be called like function1 however. The value
> of the parameter does not matter because it's unused, only the
> type.
Yes, I missed the runtime parameter.
More information about the Digitalmars-d-learn
mailing list