equivalent of std.functional.partial for templates?

Paul Backus snarwin at gmail.com
Wed Aug 11 14:03:50 UTC 2021


On Wednesday, 11 August 2021 at 14:00:33 UTC, Steven 
Schveighoffer wrote:
> I have a template function like this:
>
> ```d
> auto foo(T, Args...)(Args args) {...}
> ```
>
> If I try to bind the T only, and produce a partial template 
> function which can accept any number of parameters, but has T 
> already specified, I get an error, because instantiating 
> `foo!T` means Args is length 0.

https://phobos.dpldocs.info/std.meta.ApplyLeft.html


More information about the Digitalmars-d-learn mailing list