C ++ <map> vs <unordered_map> vs <tr1 / unordered_map> vs <ext / unordered_map>

I'm currently looking for a better alternative to std :: map and come across the classes mentioned in the post header. Can someone clarify the differences between them, not in terms of performance / API, but in terms of where they lie in relation to the current and fourth standard.

+5
source share
3 answers
  • std :: map: current C ++ standard associative container (key / value) that works like a tree behind;
  • std :: unordered_map: the next standard (C ++ 0x - or in Technical Report 1) is a hash map container that works like ... a hash map.
  • std:: tr1:: unordered_map: , , tr1, , TR1, , std.
  • ext:: unordered_map: - , , , , , std:: unordered_map, .

, std:: unordered_map - ( -). , , ( ++ 0x ).

, boost:: unordered_map, .

+10

<tr1/*> - , TR1 "". , , , ++ 0x ( ). <ext/*> ( ) , . Boost unordered_map, , , .

+1

ext/unordered_map, SGI/HP STL. _. std:: unordered_map - .

I understand that the old SGI / HP hash containers, which were hardly missed, were for some reason included in the C ++ 98 standard.

0
source

All Articles