Integral types that define opCmp, opEquals
Henning Hasemann
hhasemann at web.de
Tue Mar 6 11:40:09 PST 2007
Would it be possible/make sense to have int & co behave as if opCmp and opEquals
where defined for them?
That would make it easier in some situations to request for any type that
is comparable, i.e.
interface Comparable {
int opCmp(object);
}
would match integer & co.
Alternative would be to have another way to determine if a type is comparable
maybe a a template-thingy (Im not fit enough with templates to say
if one could write such a thing himself without special handling of integral types)
Henning
--
v4sw7Yhw4ln0pr7Ock2/3ma7uLw5Xm0l6/7DGKi2e6t6ELNSTVXb7AHIMOen5a2Xs5Mr2g5ACPR hackerkey.com
More information about the Digitalmars-d
mailing list