Dennis wrote:
What's the condition for returning true for the less than (<) operator
between two maps? Is it just based on size? Or does the contents of the
map matter and if so, how?
It's a lexicographical comparison of the maps (just like
std::lexicographical_compare()). That means an element-by-element
comparison. According to Josuttis:
1. When two elements are not equal, the result of their comparison is
the overal result.
2. If all elements have been equal so far, the shorter map is less
than the longer.
3. If all elements are equal, and the two maps are the same size, then
the result is false (since the the two maps are actually equal).
Best regards,
Tom