The Comparison Criterion
This lesson talks about the rules followed by ordered associative containers when comparing the values inside them.
We'll cover the following...
The default comparison criterion of the ordered associative containers is std::less
. If you want to use a user-defined type as the key, you have to overload the operator <
. It’s sufficient to overload the operator <
for your data type because the C++ runtime compares, with ...