Passing a single tuple or multiple values
jmh530 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jul 19 06:33:41 PDT 2016
On Tuesday, 19 July 2016 at 07:23:52 UTC, John wrote:
>
> auto bar(T...)(T x)
> {
> static if (T.length == 1 && isTuple!(T[0]))
> return foo(x.expand);
> else
> return foo(x);
> }
>
Hmm, this actually doesn't seem to be resolving my issue. I'm
still getting the error about not being able to expand x.
I tried it like below and got the same error.
auto bar(T...)(T x)
{
static if (T.length > 1)
{
return foo(x);
}
else static if (T.length == 1 && isTuple!(T))
{
return foo(x.expand);
}
}
More information about the Digitalmars-d-learn
mailing list