How to using opCmp

Jesse Phillips jessekphillips+d at gmail.com
Sat Dec 17 12:08:43 PST 2011


On Sat, 17 Dec 2011 14:06:48 +0000, Heromyth wrote:

> I have defined a opCmp function to overload comparison operators, then
> how can I use it correctly?
> 
> I can use it like this:
>    int b = t1.opCmp(info);
> and is it right like this:
>    int b = t1 < info;

Consider the code more to the point of:

int b = t1.opCmp(info);
bool c = t1 < info;


More information about the Digitalmars-d-learn mailing list