class DLLOPT Oid : public SxxxxSyntax
{
......
DLLOPT friend int operator<=(const Oid &lhs, const Oid &rhs)
{ return ((lhs < rhs) || (lhs == rhs)); };
.....
};
...全文
803打赏收藏
类直接比较 疑问?
有段代码,类直接比较 ,看不懂,哪位能否解释一下? 到底比较的是什么? class DLLOPT Oid : public SxxxxSyntax { ...... DLLOPT friend int operator<=(const Oid &lhs, const Oid &rhs) { return ((lhs < rhs) || (lhs == rhs)); }; ..... };