Why I can't pass to datetime.benchmark function with parameters?
David Nadlinger via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Apr 24 08:34:48 PDT 2016
On Saturday, 23 April 2016 at 18:52:30 UTC, Suliman wrote:
> My error. I mean it should be:
> auto r = benchmark!(foo(4))(1);
>
> But thanks for answer!
This would use the result of foo(4) as the template parameter.
Use e.g. { foo(4); } instead (a function that calls foo with the
desired argument).
- David
More information about the Digitalmars-d-learn
mailing list