Compare
The map object uses this expression to determine both the order the elements follow in the container and whether two element keys are equivalent (by comparing them reflexively: they are equivalent if !comp(a,b) && !comp(b,a)). No two elements in a map container can have equivalent keys.
This can be a function pointer or a function object (see constructor for an example). This defaults to less<T>, which returns the same as applying the less-than operator ( a<b).
Aliased as member type map::key_compare.
实现针对key的less方法用处有两点:
1.可以实现排序
2.可以实现匹配 ; if !comp(a,b) && !comp(b,a)). 则匹配。由此可以实现需要的匹配方法