opCmp()

Learn how to use opCmp() for comparisons in sorting in this lesson.

We'll cover the following...

opCmp() for sorting

Sort operators determine the sort orders of objects. All of the ordering operators, <, <=, >, and >=, are covered by the opCmp() member function.

For structs, the parameter of opCmp can be defined as in. However, as with opEquals, it is more efficient ...