make (a < b < c) illegal?

Michiel nomail at hotmail.com
Thu Feb 8 02:50:56 PST 2007


> I give up. I can't work out how to create this functionality
> for an arbitary number of arguments.

You need to use recursion, not loops. I'm not sure how the syntax works exactly,
but it might look something like this:

bool ordered(T1, T2, Trest ...)(T1 first, T2 second, Trest rest) {
    return (first < second) && ordered(second, rest);
}



More information about the Digitalmars-d mailing list