make (a < b < c) illegal?
Derek Parnell
derek at psych.ward
Thu Feb 8 03:31:46 PST 2007
On Thu, 8 Feb 2007 10:50:56 +0000 (UTC), Michiel wrote:
>> 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);
> }
Maybe ... I tried many combinations based on that. Still no luck.
Show me something that compiles and runs, anyone?
--
Derek Parnell
Melbourne, Australia
"Justice for David Hicks!"
skype: derek.j.parnell
More information about the Digitalmars-d
mailing list