On Thursday, 21 January 2016 at 22:35:09 UTC, H. S. Teoh wrote:
Try this:
import std.meta;
template Stride(size_t stride, size_t offset, Args...)
if (stride > 0)
{
static if (offset >= Args.length)
alias Stride = AliasSeq!();
On Thu, Jan 21, 2016 at 10:24:55PM +, Nordlöw via Digitalmars-d-learn wrote:
[...]
> I'm currently only lacking one thing ...namely a way to group the
> parameters of the call to a variadic function based on their offset
> and stride. That is if have
>
> haystack.substitute(x0, y0,
>
I'm currently developing a new lazy variadic generic
range/algorithm substitute() at
https://github.com/nordlow/justd/blob/master/substitution.d#L261
I plan to propose for Phobos.
It is meant to be used as
assert(`do_it`.substitute(`_`, ` `,
`d`, `g`,