On Sunday, 3 August 2014 at 19:07:32 UTC, Vlad Levenfeld wrote:
This doesn't work:

bool less_than (T)(auto ref T a, auto ref T b)
{
        return a < b;
}

Error: auto can only be used for template function parameters

What am I doing wrong? Is this not a template function?

I think you can just skip 'auto'.

Have a look at http://dlang.org/function.html , especially the function parameters section.

Reply via email to