Skip to content

Glossary: Software Design Patterns in C++

comparator

Also written: comparison function

A function you hand to something like `std::sort` that says which of two items comes first. It is the rule that varies, so it is an example of a strategy.

Where the book teaches it

Related terms

Strategylambda