Skip to content

Glossary: C++ Beyond the Basics

Comparator

Also written: comparators

A function that gets two elements and returns `true` if the first should come before the second. `std::sort` takes one as an optional third argument.

Where the book teaches it

Related terms

LambdaProjectionAlgorithm