xxxxxxxxxx
void popFront(T)(ref T[] a) { a = a[1..$]; }
enum bool isInputRange(R) = is(typeof(
{
R r;
r.popFront();
}));
struct DirEntry
{
string name() { return ""; }
alias name this;
}
pragma(msg, isInputRange!DirEntry);
pragma(msg, isInputRange!(typeof(DirEntry.init.name)));
bool isDir(R)(R r) if (isInputRange!R) { return true; }
void main()
{
DirEntry de;
bool c = isDir(de);
}