C++ overloading operators difference between == and <

前端 未结 6 1413
花落未央
花落未央 2021-01-21 17:01

Could anybody explain me what is the difference between overload == and <?

For example, if I use a map:

map         


        
6条回答
  •  渐次进展
    2021-01-21 17:25

    Probably because map is implemented as a balanced tree. Use unordered_map if you require a hash table.

提交回复
热议问题