This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: hash_map with string keys :"instantiated from here" error & STL questions


Konstantinos Pachopoulos wrote:

Hi,
Greetings; that my first gcc post. Here's the code, that causes the error.

This is not the actual code: in general to have the attention of these lists you have to post a complete, self-contained, snippet, no ellipses.


In short (your question is more suited for gcc-help, the present list is about library development), there is only *one* C++ Standard in force, the ISO/IEC Standard 14882:2003, which we are implementing to our best. In that standard there is no hash_map, for sure. We are still providing the legacy HP / SGI hashed containers but in order to use such containers with std::string you have to provide your own specialization of the hash struct (no mysteries, this is free software, just open ext/hash_fun.h). Alternately, move to the new unordered containers available via <tr1/unordered_map> and <tr1/unordered_set>, which will be also part of the forthcoming new standard in a very similar form.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]