www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - opCmp

reply Ben Hinkle <bhinkle4 juno.com> writes:
Is there a way to call the equivalent to opCmp for all types? I'd like
to test less-than,equal, or greater-than with one call. opCmp is what
I want for classes/structs that define it but the builtin types don't
define opCmp. I notice there's a "compare" function in the TypeInfo -
should I use that somehow?

thanks,
-Ben
Jul 18 2004
parent "Walter" <newshound digitalmars.com> writes:
"Ben Hinkle" <bhinkle4 juno.com> wrote in message
news:028mf0p8mi47j750nb3rgpl4t8prpjb3hi 4ax.com...
 Is there a way to call the equivalent to opCmp for all types? I'd like
 to test less-than,equal, or greater-than with one call. opCmp is what
 I want for classes/structs that define it but the builtin types don't
 define opCmp. I notice there's a "compare" function in the TypeInfo -
 should I use that somehow?
That's what it's for <g>.
Jul 19 2004