unordered-map
object as a key of unordered map
I am having problem in putting object of a class in an unordered map as key here is a simple example: class first[详细]
2023-02-25 01:11 分类:问答My static map is always empty
I declared a static unordered map in a header file as follows: static boost::unordered_map<KeyAction, sf::Key::Code> WindowKeyMap;[详细]
2023-02-20 11:31 分类:问答Defining a hash function in TR1 unordered_map inside a struct
According to this, it is possible to define an equality function in a TR1 unordered_map like this: #incl开发者_JAVA技巧ude <tr1/unordered_map>[详细]
2023-02-20 07:48 分类:问答Why Visual Studio cannot find 'tr1/unordered_map?
I want to use google-ctemplate in a project. But if I include the basic file, I get the following error (with Visual Studio C++ 2005):[详细]
2023-02-16 18:31 分类:问答pair<int,int> pair as key of unordered_map issue
My code: typedef pair<int,int> Pair tr1::unordered_map<Pair,bool> h; h.insert(make_pair(Pair(0,0),true));[详细]
2023-02-08 14:04 分类:问答Why would map be much faster than unordered_map?
I implemented a search caching results that consist of keys of type State (a class with 7 short ints) and values of type Score (a class of 3 doubles.) Using unordered_map was at least 20 times slower[详细]
2023-02-08 02:42 分类:问答Overriding new but telling unordered_map not to use it
I\'m writing a garbage collector for C/C++ as a programming exercise, and part of this involves globally overriding new. However, the garbage collector also uses an unordered_map (to store pointers to[详细]
2023-01-30 20:34 分类:问答how to use boost::unordered_map
for my application, i need to use a hash map, so i have written a test program in which i store some instances of a baseclass in a boost::unordered_map. but i want to reach the instances by calling sp[详细]
2023-01-20 22:58 分类:问答Unordered (hash) map from bitset to bitset on boost
I want to use a cache, implemented by boost\'s unordered_map, from a dynamic_bitset to a dynamic_bitset. The problem, of course, is that there is no default hash function from the bitset. It doesn\'t[详细]
2023-01-19 20:38 分类:问答Does C++11 provide hashing functions for std::type_info?
I\'m still working on a good solution to my One-Of-A-Type Container Problem -- and upon reflection I think it would be nice to be able to just use something like a std::map<std::type_info, boost::a[详细]
2023-01-13 06:39 分类:问答