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);
}


void main()
{
        auto x = tuple(1, 2);
        auto y = bar(x);
        auto z = bar(x.expand);
        writeln(y);
        writeln(z);
}

I was leaving out the T[0] in the isTuple!

Reply via email to