Why are the lexicographical comparison operators assumed as non-member functions for containers?

77 views Asked by At

When having a look at the documentation of std::map, I noticed that the lexicographical comparison operators (between maps) were not counted as member functions. Checked a few other containers (vector, list, etc.) and saw the same situation for them also. Is there a reason for that? Aren't those operators overloaded inside those container classes?

Here is a related answer arguing the basic rules of operator overloading.

0

There are 0 answers